X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=net%2Fx25%2Faf_x25.c;h=07fad7ccf83204c137b90fb0bfc906dd25a0dfbf;hb=6bf1574ee33270e7c0b9d43103e8cedffd9f74db;hp=2e9931571a4d29f092e07725465ec3a28563981e;hpb=1b8d7ae42d02e483ad94035cca851e4f7fbecb40;p=linux-2.6 diff --git a/net/x25/af_x25.c b/net/x25/af_x25.c index 2e9931571a..07fad7ccf8 100644 --- a/net/x25/af_x25.c +++ b/net/x25/af_x25.c @@ -83,9 +83,9 @@ struct compat_x25_subscrip_struct { int x25_addr_ntoa(unsigned char *p, struct x25_address *called_addr, struct x25_address *calling_addr) { - int called_len, calling_len; + unsigned int called_len, calling_len; char *called, *calling; - int i; + unsigned int i; called_len = (*p >> 0) & 0x0F; calling_len = (*p >> 4) & 0x0F; @@ -191,6 +191,9 @@ static int x25_device_event(struct notifier_block *this, unsigned long event, struct net_device *dev = ptr; struct x25_neigh *nb; + if (dev->nd_net != &init_net) + return NOTIFY_DONE; + if (dev->type == ARPHRD_X25 #if defined(CONFIG_LLC) || defined(CONFIG_LLC_MODULE) || dev->type == ARPHRD_ETHER @@ -469,7 +472,7 @@ static struct proto x25_proto = { static struct sock *x25_alloc_socket(struct net *net) { struct x25_sock *x25; - struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto, 1); + struct sock *sk = sk_alloc(net, AF_X25, GFP_ATOMIC, &x25_proto); if (!sk) goto out;