|
@@ -288,7 +288,7 @@ static struct sock *x25_find_listener(struct x25_address *addr,
|
|
|
sk_for_each(s, &x25_list)
|
|
|
if ((!strcmp(addr->x25_addr,
|
|
|
x25_sk(s)->source_addr.x25_addr) ||
|
|
|
- !strcmp(addr->x25_addr,
|
|
|
+ !strcmp(x25_sk(s)->source_addr.x25_addr,
|
|
|
null_x25_address.x25_addr)) &&
|
|
|
s->sk_state == TCP_LISTEN) {
|
|
|
/*
|
|
@@ -688,11 +688,15 @@ static int x25_bind(struct socket *sock, struct sockaddr *uaddr, int addr_len)
|
|
|
goto out;
|
|
|
}
|
|
|
|
|
|
- len = strlen(addr->sx25_addr.x25_addr);
|
|
|
- for (i = 0; i < len; i++) {
|
|
|
- if (!isdigit(addr->sx25_addr.x25_addr[i])) {
|
|
|
- rc = -EINVAL;
|
|
|
- goto out;
|
|
|
+ /* check for the null_x25_address */
|
|
|
+ if (strcmp(addr->sx25_addr.x25_addr, null_x25_address.x25_addr)) {
|
|
|
+
|
|
|
+ len = strlen(addr->sx25_addr.x25_addr);
|
|
|
+ for (i = 0; i < len; i++) {
|
|
|
+ if (!isdigit(addr->sx25_addr.x25_addr[i])) {
|
|
|
+ rc = -EINVAL;
|
|
|
+ goto out;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|