diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2000-11-23 02:00:47 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2000-11-23 02:00:47 +0000 |
commit | 06615f62b17d7de6e12d2f5ec6b88cf30af08413 (patch) | |
tree | 8766f208847d4876a6db619aebbf54d53b76eb44 /net/ipv6 | |
parent | fa9bdb574f4febb751848a685d9a9017e04e1d53 (diff) |
Merge with Linux 2.4.0-test10.
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/af_inet6.c | 27 | ||||
-rw-r--r-- | net/ipv6/protocol.c | 2 | ||||
-rw-r--r-- | net/ipv6/raw.c | 4 | ||||
-rw-r--r-- | net/ipv6/sit.c | 6 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 8 | ||||
-rw-r--r-- | net/ipv6/udp.c | 4 |
6 files changed, 20 insertions, 31 deletions
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 869cac689..c243a6ec9 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c @@ -7,7 +7,7 @@ * * Adapted from linux/net/ipv4/af_inet.c * - * $Id: af_inet6.c,v 1.58 2000/09/18 05:59:48 davem Exp $ + * $Id: af_inet6.c,v 1.60 2000/10/19 01:05:34 davem Exp $ * * Fixes: * Hideaki YOSHIFUJI : sin6_scope_id support @@ -502,11 +502,7 @@ extern void ipv6_sysctl_register(void); extern void ipv6_sysctl_unregister(void); #endif -#ifdef MODULE -int init_module(void) -#else -void __init inet6_proto_init(struct net_proto *pro) -#endif +static int __init inet6_init(void) { struct sk_buff *dummy_skb; int err; @@ -523,11 +519,7 @@ void __init inet6_proto_init(struct net_proto *pro) if (sizeof(struct inet6_skb_parm) > sizeof(dummy_skb->cb)) { printk(KERN_CRIT "inet6_proto_init: size fault\n"); -#ifdef MODULE return -EINVAL; -#else - return; -#endif } /* @@ -577,11 +569,7 @@ void __init inet6_proto_init(struct net_proto *pro) /* Now the userspace is allowed to create INET6 sockets. */ (void) sock_register(&inet6_family_ops); -#ifdef MODULE return 0; -#else - return; -#endif #ifdef CONFIG_PROC_FS proc_snmp6_fail: @@ -603,15 +591,13 @@ icmp_fail: #if defined(MODULE) && defined(CONFIG_SYSCTL) ipv6_sysctl_unregister(); #endif -#ifdef MODULE return err; -#else - return; -#endif } +module_init(inet6_init); + #ifdef MODULE -void cleanup_module(void) +static void inet6_exit(void) { /* First of all disallow new sockets creation. */ sock_unregister(PF_INET6); @@ -636,4 +622,5 @@ void cleanup_module(void) ipv6_sysctl_unregister(); #endif } -#endif /* MODULE */ +module_exit(inet6_exit); +#endif /* MODULE */ diff --git a/net/ipv6/protocol.c b/net/ipv6/protocol.c index 43ac35004..df1e9324f 100644 --- a/net/ipv6/protocol.c +++ b/net/ipv6/protocol.c @@ -5,7 +5,7 @@ * * PF_INET6 protocol dispatch tables. * - * Version: $Id: protocol.c,v 1.8 2000/02/22 23:54:29 davem Exp $ + * Version: $Id: protocol.c,v 1.9 2000/10/03 07:29:01 anton Exp $ * * Authors: Pedro Roque <roque@di.fc.ul.pt> * diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index 0b7e00252..43ef2e87d 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c @@ -7,7 +7,7 @@ * * Adapted from linux/net/ipv4/raw.c * - * $Id: raw.c,v 1.40 2000/08/09 11:59:04 davem Exp $ + * $Id: raw.c,v 1.41 2000/10/18 18:04:23 davem Exp $ * * Fixes: * Hideaki YOSHIFUJI : sin6_scope_id support @@ -793,7 +793,7 @@ int raw6_get_info(char *buffer, char **start, off_t offset, int length) if (sk->family != PF_INET6) continue; pos += LINE_LEN+1; - if (pos < offset) + if (pos <= offset) continue; get_raw6_sock(sk, tmpbuf, i); len += sprintf(buffer+len, LINE_FMT, tmpbuf); diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index 59048a22b..f263a3197 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c @@ -6,7 +6,7 @@ * Pedro Roque <roque@di.fc.ul.pt> * Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> * - * $Id: sit.c,v 1.43 2000/08/25 02:15:47 davem Exp $ + * $Id: sit.c,v 1.45 2000/10/28 17:19:25 davem Exp $ * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -188,7 +188,7 @@ struct ip_tunnel * ipip6_tunnel_locate(struct ip_tunnel_parm *parms, int create) } if (i==100) goto failed; - memcpy(parms->name, dev->name, IFNAMSIZ); + memcpy(nt->parms.name, dev->name, IFNAMSIZ); } if (register_netdevice(dev) < 0) goto failed; @@ -829,7 +829,9 @@ int __init sit_init(void) #ifdef MODULE register_netdev(&ipip6_fb_tunnel_dev); #else + rtnl_lock(); register_netdevice(&ipip6_fb_tunnel_dev); + rtnl_unlock(); #endif inet_add_protocol(&sit_protocol); return 0; diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 952e24765..b830884e8 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c @@ -5,7 +5,7 @@ * Authors: * Pedro Roque <roque@di.fc.ul.pt> * - * $Id: tcp_ipv6.c,v 1.125 2000/08/09 11:59:04 davem Exp $ + * $Id: tcp_ipv6.c,v 1.126 2000/10/18 18:04:23 davem Exp $ * * Based on: * linux/net/ipv4/tcp.c @@ -2009,7 +2009,7 @@ int tcp6_get_info(char *buffer, char **start, off_t offset, int length) if (req->class->family != PF_INET6) continue; pos += LINE_LEN+1; - if (pos < offset) + if (pos <= offset) continue; get_openreq6(sk, req, tmpbuf, num, uid); len += sprintf(buffer+len, LINE_FMT, tmpbuf); @@ -2041,7 +2041,7 @@ int tcp6_get_info(char *buffer, char **start, off_t offset, int length) if (sk->family != PF_INET6) continue; pos += LINE_LEN+1; - if (pos < offset) + if (pos <= offset) continue; get_tcp6_sock(sk, tmpbuf, num); len += sprintf(buffer+len, LINE_FMT, tmpbuf); @@ -2056,7 +2056,7 @@ int tcp6_get_info(char *buffer, char **start, off_t offset, int length) if (tw->family != PF_INET6) continue; pos += LINE_LEN+1; - if (pos < offset) + if (pos <= offset) continue; get_timewait6_sock(tw, tmpbuf, num); len += sprintf(buffer+len, LINE_FMT, tmpbuf); diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 4d95aa40b..187db4414 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c @@ -7,7 +7,7 @@ * * Based on linux/ipv4/udp.c * - * $Id: udp.c,v 1.57 2000/09/18 05:59:48 davem Exp $ + * $Id: udp.c,v 1.58 2000/10/18 18:04:23 davem Exp $ * * Fixes: * Hideaki YOSHIFUJI : sin6_scope_id support @@ -956,7 +956,7 @@ int udp6_get_info(char *buffer, char **start, off_t offset, int length) if (sk->family != PF_INET6) continue; pos += LINE_LEN+1; - if (pos < offset) + if (pos <= offset) continue; get_udp6_sock(sk, tmpbuf, i); len += sprintf(buffer+len, LINE_FMT, tmpbuf); |