diff options
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/addrconf.c | 8 | ||||
-rw-r--r-- | net/ipv6/addrconf_core.c | 3 | ||||
-rw-r--r-- | net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | 4 | ||||
-rw-r--r-- | net/ipv6/route.c | 5 |
4 files changed, 13 insertions, 7 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 0601292091..91ef3be5ab 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -2256,14 +2256,14 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2256 | struct net_device *dev = (struct net_device *) data; | 2256 | struct net_device *dev = (struct net_device *) data; |
2257 | struct inet6_dev *idev = __in6_dev_get(dev); | 2257 | struct inet6_dev *idev = __in6_dev_get(dev); |
2258 | int run_pending = 0; | 2258 | int run_pending = 0; |
2259 | int err; | ||
2259 | 2260 | ||
2260 | switch(event) { | 2261 | switch(event) { |
2261 | case NETDEV_REGISTER: | 2262 | case NETDEV_REGISTER: |
2262 | if (!idev && dev->mtu >= IPV6_MIN_MTU) { | 2263 | if (!idev && dev->mtu >= IPV6_MIN_MTU) { |
2263 | idev = ipv6_add_dev(dev); | 2264 | idev = ipv6_add_dev(dev); |
2264 | if (!idev) | 2265 | if (!idev) |
2265 | printk(KERN_WARNING "IPv6: add_dev failed for %s\n", | 2266 | return notifier_from_errno(-ENOMEM); |
2266 | dev->name); | ||
2267 | } | 2267 | } |
2268 | break; | 2268 | break; |
2269 | case NETDEV_UP: | 2269 | case NETDEV_UP: |
@@ -2373,7 +2373,9 @@ static int addrconf_notify(struct notifier_block *this, unsigned long event, | |||
2373 | NULL); | 2373 | NULL); |
2374 | addrconf_sysctl_register(idev, &idev->cnf); | 2374 | addrconf_sysctl_register(idev, &idev->cnf); |
2375 | #endif | 2375 | #endif |
2376 | snmp6_register_dev(idev); | 2376 | err = snmp6_register_dev(idev); |
2377 | if (err) | ||
2378 | return notifier_from_errno(err); | ||
2377 | } | 2379 | } |
2378 | break; | 2380 | break; |
2379 | } | 2381 | } |
diff --git a/net/ipv6/addrconf_core.c b/net/ipv6/addrconf_core.c index faaefb6922..3f82e9542e 100644 --- a/net/ipv6/addrconf_core.c +++ b/net/ipv6/addrconf_core.c | |||
@@ -50,6 +50,9 @@ int __ipv6_addr_type(const struct in6_addr *addr) | |||
50 | if ((st & htonl(0xFFC00000)) == htonl(0xFEC00000)) | 50 | if ((st & htonl(0xFFC00000)) == htonl(0xFEC00000)) |
51 | return (IPV6_ADDR_SITELOCAL | IPV6_ADDR_UNICAST | | 51 | return (IPV6_ADDR_SITELOCAL | IPV6_ADDR_UNICAST | |
52 | IPV6_ADDR_SCOPE_TYPE(IPV6_ADDR_SCOPE_SITELOCAL)); /* addr-select 3.1 */ | 52 | IPV6_ADDR_SCOPE_TYPE(IPV6_ADDR_SCOPE_SITELOCAL)); /* addr-select 3.1 */ |
53 | if ((st & htonl(0xFE000000)) == htonl(0xFC000000)) | ||
54 | return (IPV6_ADDR_UNICAST | | ||
55 | IPV6_ADDR_SCOPE_TYPE(IPV6_ADDR_SCOPE_GLOBAL)); /* RFC 4193 */ | ||
53 | 56 | ||
54 | if ((addr->s6_addr32[0] | addr->s6_addr32[1]) == 0) { | 57 | if ((addr->s6_addr32[0] | addr->s6_addr32[1]) == 0) { |
55 | if (addr->s6_addr32[2] == 0) { | 58 | if (addr->s6_addr32[2] == 0) { |
diff --git a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c index 36df2218b6..3153e15e0f 100644 --- a/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c +++ b/net/ipv6/netfilter/nf_conntrack_l3proto_ipv6.c | |||
@@ -86,8 +86,8 @@ static int ipv6_print_conntrack(struct seq_file *s, | |||
86 | * - Note also special handling of AUTH header. Thanks to IPsec wizards. | 86 | * - Note also special handling of AUTH header. Thanks to IPsec wizards. |
87 | */ | 87 | */ |
88 | 88 | ||
89 | int nf_ct_ipv6_skip_exthdr(const struct sk_buff *skb, int start, u8 *nexthdrp, | 89 | static int nf_ct_ipv6_skip_exthdr(const struct sk_buff *skb, int start, |
90 | int len) | 90 | u8 *nexthdrp, int len) |
91 | { | 91 | { |
92 | u8 nexthdr = *nexthdrp; | 92 | u8 nexthdr = *nexthdrp; |
93 | 93 | ||
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 919de682b3..55ea80fac6 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -1983,9 +1983,10 @@ static int rt6_mtu_change_route(struct rt6_info *rt, void *p_arg) | |||
1983 | !dst_metric_locked(&rt->u.dst, RTAX_MTU) && | 1983 | !dst_metric_locked(&rt->u.dst, RTAX_MTU) && |
1984 | (dst_mtu(&rt->u.dst) > arg->mtu || | 1984 | (dst_mtu(&rt->u.dst) > arg->mtu || |
1985 | (dst_mtu(&rt->u.dst) < arg->mtu && | 1985 | (dst_mtu(&rt->u.dst) < arg->mtu && |
1986 | dst_mtu(&rt->u.dst) == idev->cnf.mtu6))) | 1986 | dst_mtu(&rt->u.dst) == idev->cnf.mtu6))) { |
1987 | rt->u.dst.metrics[RTAX_MTU-1] = arg->mtu; | 1987 | rt->u.dst.metrics[RTAX_MTU-1] = arg->mtu; |
1988 | rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(arg->mtu); | 1988 | rt->u.dst.metrics[RTAX_ADVMSS-1] = ipv6_advmss(arg->mtu); |
1989 | } | ||
1989 | return 0; | 1990 | return 0; |
1990 | } | 1991 | } |
1991 | 1992 | ||