diff options
Diffstat (limited to 'net/ipv6')
36 files changed, 65 insertions, 19 deletions
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index 3381b4317c27..413054f02aab 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
| @@ -53,6 +53,7 @@ | |||
| 53 | #include <linux/route.h> | 53 | #include <linux/route.h> |
| 54 | #include <linux/inetdevice.h> | 54 | #include <linux/inetdevice.h> |
| 55 | #include <linux/init.h> | 55 | #include <linux/init.h> |
| 56 | #include <linux/slab.h> | ||
| 56 | #ifdef CONFIG_SYSCTL | 57 | #ifdef CONFIG_SYSCTL |
| 57 | #include <linux/sysctl.h> | 58 | #include <linux/sysctl.h> |
| 58 | #endif | 59 | #endif |
| @@ -3610,7 +3611,7 @@ static int inet6_dump_addr(struct sk_buff *skb, struct netlink_callback *cb, | |||
| 3610 | hlist_for_each_entry_rcu(dev, node, head, index_hlist) { | 3611 | hlist_for_each_entry_rcu(dev, node, head, index_hlist) { |
| 3611 | if (idx < s_idx) | 3612 | if (idx < s_idx) |
| 3612 | goto cont; | 3613 | goto cont; |
| 3613 | if (idx > s_idx) | 3614 | if (h > s_h || idx > s_idx) |
| 3614 | s_ip_idx = 0; | 3615 | s_ip_idx = 0; |
| 3615 | ip_idx = 0; | 3616 | ip_idx = 0; |
| 3616 | if ((idev = __in6_dev_get(dev)) == NULL) | 3617 | if ((idev = __in6_dev_get(dev)) == NULL) |
diff --git a/net/ipv6/addrlabel.c b/net/ipv6/addrlabel.c index 6ff73c4c126a..ae404c9a746c 100644 --- a/net/ipv6/addrlabel.c +++ b/net/ipv6/addrlabel.c | |||
| @@ -13,6 +13,7 @@ | |||
| 13 | #include <linux/list.h> | 13 | #include <linux/list.h> |
| 14 | #include <linux/rcupdate.h> | 14 | #include <linux/rcupdate.h> |
| 15 | #include <linux/in6.h> | 15 | #include <linux/in6.h> |
| 16 | #include <linux/slab.h> | ||
| 16 | #include <net/addrconf.h> | 17 | #include <net/addrconf.h> |
| 17 | #include <linux/if_addrlabel.h> | 18 | #include <linux/if_addrlabel.h> |
| 18 | #include <linux/netlink.h> | 19 | #include <linux/netlink.h> |
diff --git a/net/ipv6/af_inet6.c b/net/ipv6/af_inet6.c index 37d14e735c27..3f9e86b15e0d 100644 --- a/net/ipv6/af_inet6.c +++ b/net/ipv6/af_inet6.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/proc_fs.h> | 36 | #include <linux/proc_fs.h> |
| 37 | #include <linux/stat.h> | 37 | #include <linux/stat.h> |
| 38 | #include <linux/init.h> | 38 | #include <linux/init.h> |
| 39 | #include <linux/slab.h> | ||
| 39 | 40 | ||
| 40 | #include <linux/inet.h> | 41 | #include <linux/inet.h> |
| 41 | #include <linux/netdevice.h> | 42 | #include <linux/netdevice.h> |
| @@ -199,7 +200,7 @@ lookup_protocol: | |||
| 199 | 200 | ||
| 200 | inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk); | 201 | inet_sk(sk)->pinet6 = np = inet6_sk_generic(sk); |
| 201 | np->hop_limit = -1; | 202 | np->hop_limit = -1; |
| 202 | np->mcast_hops = -1; | 203 | np->mcast_hops = IPV6_DEFAULT_MCASTHOPS; |
| 203 | np->mc_loop = 1; | 204 | np->mc_loop = 1; |
| 204 | np->pmtudisc = IPV6_PMTUDISC_WANT; | 205 | np->pmtudisc = IPV6_PMTUDISC_WANT; |
| 205 | np->ipv6only = net->ipv6.sysctl.bindv6only; | 206 | np->ipv6only = net->ipv6.sysctl.bindv6only; |
diff --git a/net/ipv6/ah6.c b/net/ipv6/ah6.c index 5ac89025f9de..ee82d4ef26ce 100644 --- a/net/ipv6/ah6.c +++ b/net/ipv6/ah6.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | 26 | ||
| 27 | #include <crypto/hash.h> | 27 | #include <crypto/hash.h> |
| 28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
| 29 | #include <linux/slab.h> | ||
| 29 | #include <net/ip.h> | 30 | #include <net/ip.h> |
| 30 | #include <net/ah.h> | 31 | #include <net/ah.h> |
| 31 | #include <linux/crypto.h> | 32 | #include <linux/crypto.h> |
diff --git a/net/ipv6/anycast.c b/net/ipv6/anycast.c index c4f6ca32fa74..b5b07054508a 100644 --- a/net/ipv6/anycast.c +++ b/net/ipv6/anycast.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/init.h> | 29 | #include <linux/init.h> |
| 30 | #include <linux/proc_fs.h> | 30 | #include <linux/proc_fs.h> |
| 31 | #include <linux/seq_file.h> | 31 | #include <linux/seq_file.h> |
| 32 | #include <linux/slab.h> | ||
| 32 | 33 | ||
| 33 | #include <net/net_namespace.h> | 34 | #include <net/net_namespace.h> |
| 34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
diff --git a/net/ipv6/datagram.c b/net/ipv6/datagram.c index e6f9cdf780fe..622dc7939a1b 100644 --- a/net/ipv6/datagram.c +++ b/net/ipv6/datagram.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/in6.h> | 21 | #include <linux/in6.h> |
| 22 | #include <linux/ipv6.h> | 22 | #include <linux/ipv6.h> |
| 23 | #include <linux/route.h> | 23 | #include <linux/route.h> |
| 24 | #include <linux/slab.h> | ||
| 24 | 25 | ||
| 25 | #include <net/ipv6.h> | 26 | #include <net/ipv6.h> |
| 26 | #include <net/ndisc.h> | 27 | #include <net/ndisc.h> |
diff --git a/net/ipv6/exthdrs.c b/net/ipv6/exthdrs.c index 074f2c084f9f..8a659f92d17a 100644 --- a/net/ipv6/exthdrs.c +++ b/net/ipv6/exthdrs.c | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #include <linux/netdevice.h> | 29 | #include <linux/netdevice.h> |
| 30 | #include <linux/in6.h> | 30 | #include <linux/in6.h> |
| 31 | #include <linux/icmpv6.h> | 31 | #include <linux/icmpv6.h> |
| 32 | #include <linux/slab.h> | ||
| 32 | 33 | ||
| 33 | #include <net/dst.h> | 34 | #include <net/dst.h> |
| 34 | #include <net/sock.h> | 35 | #include <net/sock.h> |
diff --git a/net/ipv6/icmp.c b/net/ipv6/icmp.c index eb9abe24bdf0..3330a4bd6157 100644 --- a/net/ipv6/icmp.c +++ b/net/ipv6/icmp.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/skbuff.h> | 40 | #include <linux/skbuff.h> |
| 41 | #include <linux/init.h> | 41 | #include <linux/init.h> |
| 42 | #include <linux/netfilter.h> | 42 | #include <linux/netfilter.h> |
| 43 | #include <linux/slab.h> | ||
| 43 | 44 | ||
| 44 | #ifdef CONFIG_SYSCTL | 45 | #ifdef CONFIG_SYSCTL |
| 45 | #include <linux/sysctl.h> | 46 | #include <linux/sysctl.h> |
diff --git a/net/ipv6/inet6_connection_sock.c b/net/ipv6/inet6_connection_sock.c index 3516e6fe2e56..628db24bcf22 100644 --- a/net/ipv6/inet6_connection_sock.c +++ b/net/ipv6/inet6_connection_sock.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <linux/in6.h> | 17 | #include <linux/in6.h> |
| 18 | #include <linux/ipv6.h> | 18 | #include <linux/ipv6.h> |
| 19 | #include <linux/jhash.h> | 19 | #include <linux/jhash.h> |
| 20 | #include <linux/slab.h> | ||
| 20 | 21 | ||
| 21 | #include <net/addrconf.h> | 22 | #include <net/addrconf.h> |
| 22 | #include <net/inet_connection_sock.h> | 23 | #include <net/inet_connection_sock.h> |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 2f9847924fa5..6b82e02158c6 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
| @@ -26,6 +26,7 @@ | |||
| 26 | #include <linux/in6.h> | 26 | #include <linux/in6.h> |
| 27 | #include <linux/init.h> | 27 | #include <linux/init.h> |
| 28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
| 29 | #include <linux/slab.h> | ||
| 29 | 30 | ||
| 30 | #ifdef CONFIG_PROC_FS | 31 | #ifdef CONFIG_PROC_FS |
| 31 | #include <linux/proc_fs.h> | 32 | #include <linux/proc_fs.h> |
diff --git a/net/ipv6/ip6_flowlabel.c b/net/ipv6/ip6_flowlabel.c index e41eba8aacf1..14e23216eb28 100644 --- a/net/ipv6/ip6_flowlabel.c +++ b/net/ipv6/ip6_flowlabel.c | |||
| @@ -20,6 +20,7 @@ | |||
| 20 | #include <linux/route.h> | 20 | #include <linux/route.h> |
| 21 | #include <linux/proc_fs.h> | 21 | #include <linux/proc_fs.h> |
| 22 | #include <linux/seq_file.h> | 22 | #include <linux/seq_file.h> |
| 23 | #include <linux/slab.h> | ||
| 23 | 24 | ||
| 24 | #include <net/net_namespace.h> | 25 | #include <net/net_namespace.h> |
| 25 | #include <net/sock.h> | 26 | #include <net/sock.h> |
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index e28f9203deca..6aa7ee1295c2 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/in6.h> | 28 | #include <linux/in6.h> |
| 29 | #include <linux/icmpv6.h> | 29 | #include <linux/icmpv6.h> |
| 30 | #include <linux/mroute6.h> | 30 | #include <linux/mroute6.h> |
| 31 | #include <linux/slab.h> | ||
| 31 | 32 | ||
| 32 | #include <linux/netfilter.h> | 33 | #include <linux/netfilter.h> |
| 33 | #include <linux/netfilter_ipv6.h> | 34 | #include <linux/netfilter_ipv6.h> |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index dabf108ad811..75d5ef830097 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include <linux/tcp.h> | 37 | #include <linux/tcp.h> |
| 38 | #include <linux/route.h> | 38 | #include <linux/route.h> |
| 39 | #include <linux/module.h> | 39 | #include <linux/module.h> |
| 40 | #include <linux/slab.h> | ||
| 40 | 41 | ||
| 41 | #include <linux/netfilter.h> | 42 | #include <linux/netfilter.h> |
| 42 | #include <linux/netfilter_ipv6.h> | 43 | #include <linux/netfilter_ipv6.h> |
| @@ -107,7 +108,7 @@ static int ip6_dev_loopback_xmit(struct sk_buff *newskb) | |||
| 107 | newskb->ip_summed = CHECKSUM_UNNECESSARY; | 108 | newskb->ip_summed = CHECKSUM_UNNECESSARY; |
| 108 | WARN_ON(!skb_dst(newskb)); | 109 | WARN_ON(!skb_dst(newskb)); |
| 109 | 110 | ||
| 110 | netif_rx(newskb); | 111 | netif_rx_ni(newskb); |
| 111 | return 0; | 112 | return 0; |
| 112 | } | 113 | } |
| 113 | 114 | ||
| @@ -628,7 +629,7 @@ static int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *)) | |||
| 628 | /* We must not fragment if the socket is set to force MTU discovery | 629 | /* We must not fragment if the socket is set to force MTU discovery |
| 629 | * or if the skb it not generated by a local socket. | 630 | * or if the skb it not generated by a local socket. |
| 630 | */ | 631 | */ |
| 631 | if (!skb->local_df) { | 632 | if (!skb->local_df && skb->len > mtu) { |
| 632 | skb->dev = skb_dst(skb)->dev; | 633 | skb->dev = skb_dst(skb)->dev; |
| 633 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); | 634 | icmpv6_send(skb, ICMPV6_PKT_TOOBIG, 0, mtu); |
| 634 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), | 635 | IP6_INC_STATS(net, ip6_dst_idev(skb_dst(skb)), |
diff --git a/net/ipv6/ip6_tunnel.c b/net/ipv6/ip6_tunnel.c index 138980eec214..2599870747ec 100644 --- a/net/ipv6/ip6_tunnel.c +++ b/net/ipv6/ip6_tunnel.c | |||
| @@ -37,6 +37,7 @@ | |||
| 37 | #include <linux/route.h> | 37 | #include <linux/route.h> |
| 38 | #include <linux/rtnetlink.h> | 38 | #include <linux/rtnetlink.h> |
| 39 | #include <linux/netfilter_ipv6.h> | 39 | #include <linux/netfilter_ipv6.h> |
| 40 | #include <linux/slab.h> | ||
| 40 | 41 | ||
| 41 | #include <asm/uaccess.h> | 42 | #include <asm/uaccess.h> |
| 42 | #include <asm/atomic.h> | 43 | #include <asm/atomic.h> |
diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c index 52e0f74fdfe0..3e333268db89 100644 --- a/net/ipv6/ip6mr.c +++ b/net/ipv6/ip6mr.c | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | #include <linux/proc_fs.h> | 33 | #include <linux/proc_fs.h> |
| 34 | #include <linux/seq_file.h> | 34 | #include <linux/seq_file.h> |
| 35 | #include <linux/init.h> | 35 | #include <linux/init.h> |
| 36 | #include <linux/slab.h> | ||
| 36 | #include <net/protocol.h> | 37 | #include <net/protocol.h> |
| 37 | #include <linux/skbuff.h> | 38 | #include <linux/skbuff.h> |
| 38 | #include <net/sock.h> | 39 | #include <net/sock.h> |
| @@ -1113,6 +1114,9 @@ static int ip6mr_mfc_add(struct net *net, struct mf6cctl *mfc, int mrtsock) | |||
| 1113 | unsigned char ttls[MAXMIFS]; | 1114 | unsigned char ttls[MAXMIFS]; |
| 1114 | int i; | 1115 | int i; |
| 1115 | 1116 | ||
| 1117 | if (mfc->mf6cc_parent >= MAXMIFS) | ||
| 1118 | return -ENFILE; | ||
| 1119 | |||
| 1116 | memset(ttls, 255, MAXMIFS); | 1120 | memset(ttls, 255, MAXMIFS); |
| 1117 | for (i = 0; i < MAXMIFS; i++) { | 1121 | for (i = 0; i < MAXMIFS; i++) { |
| 1118 | if (IF_ISSET(i, &mfc->mf6cc_ifset)) | 1122 | if (IF_ISSET(i, &mfc->mf6cc_ifset)) |
| @@ -1692,17 +1696,20 @@ ip6mr_fill_mroute(struct sk_buff *skb, struct mfc6_cache *c, struct rtmsg *rtm) | |||
| 1692 | int ct; | 1696 | int ct; |
| 1693 | struct rtnexthop *nhp; | 1697 | struct rtnexthop *nhp; |
| 1694 | struct net *net = mfc6_net(c); | 1698 | struct net *net = mfc6_net(c); |
| 1695 | struct net_device *dev = net->ipv6.vif6_table[c->mf6c_parent].dev; | ||
| 1696 | u8 *b = skb_tail_pointer(skb); | 1699 | u8 *b = skb_tail_pointer(skb); |
| 1697 | struct rtattr *mp_head; | 1700 | struct rtattr *mp_head; |
| 1698 | 1701 | ||
| 1699 | if (dev) | 1702 | /* If cache is unresolved, don't try to parse IIF and OIF */ |
| 1700 | RTA_PUT(skb, RTA_IIF, 4, &dev->ifindex); | 1703 | if (c->mf6c_parent > MAXMIFS) |
| 1704 | return -ENOENT; | ||
| 1705 | |||
| 1706 | if (MIF_EXISTS(net, c->mf6c_parent)) | ||
| 1707 | RTA_PUT(skb, RTA_IIF, 4, &net->ipv6.vif6_table[c->mf6c_parent].dev->ifindex); | ||
| 1701 | 1708 | ||
| 1702 | mp_head = (struct rtattr *)skb_put(skb, RTA_LENGTH(0)); | 1709 | mp_head = (struct rtattr *)skb_put(skb, RTA_LENGTH(0)); |
| 1703 | 1710 | ||
| 1704 | for (ct = c->mfc_un.res.minvif; ct < c->mfc_un.res.maxvif; ct++) { | 1711 | for (ct = c->mfc_un.res.minvif; ct < c->mfc_un.res.maxvif; ct++) { |
| 1705 | if (c->mfc_un.res.ttls[ct] < 255) { | 1712 | if (MIF_EXISTS(net, ct) && c->mfc_un.res.ttls[ct] < 255) { |
| 1706 | if (skb_tailroom(skb) < RTA_ALIGN(RTA_ALIGN(sizeof(*nhp)) + 4)) | 1713 | if (skb_tailroom(skb) < RTA_ALIGN(RTA_ALIGN(sizeof(*nhp)) + 4)) |
| 1707 | goto rtattr_failure; | 1714 | goto rtattr_failure; |
| 1708 | nhp = (struct rtnexthop *)skb_put(skb, RTA_ALIGN(sizeof(*nhp))); | 1715 | nhp = (struct rtnexthop *)skb_put(skb, RTA_ALIGN(sizeof(*nhp))); |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 430454ee5ead..33f60fca7aa7 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
| @@ -36,6 +36,7 @@ | |||
| 36 | #include <linux/init.h> | 36 | #include <linux/init.h> |
| 37 | #include <linux/sysctl.h> | 37 | #include <linux/sysctl.h> |
| 38 | #include <linux/netfilter.h> | 38 | #include <linux/netfilter.h> |
| 39 | #include <linux/slab.h> | ||
| 39 | 40 | ||
| 40 | #include <net/sock.h> | 41 | #include <net/sock.h> |
| 41 | #include <net/snmp.h> | 42 | #include <net/snmp.h> |
diff --git a/net/ipv6/mcast.c b/net/ipv6/mcast.c index bcd971915969..c483ab9fd67b 100644 --- a/net/ipv6/mcast.c +++ b/net/ipv6/mcast.c | |||
| @@ -43,6 +43,7 @@ | |||
| 43 | #include <linux/init.h> | 43 | #include <linux/init.h> |
| 44 | #include <linux/proc_fs.h> | 44 | #include <linux/proc_fs.h> |
| 45 | #include <linux/seq_file.h> | 45 | #include <linux/seq_file.h> |
| 46 | #include <linux/slab.h> | ||
| 46 | 47 | ||
| 47 | #include <linux/netfilter.h> | 48 | #include <linux/netfilter.h> |
| 48 | #include <linux/netfilter_ipv6.h> | 49 | #include <linux/netfilter_ipv6.h> |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 8bcc4b7db3bf..da0a4d2adc69 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
| @@ -59,6 +59,7 @@ | |||
| 59 | #include <linux/route.h> | 59 | #include <linux/route.h> |
| 60 | #include <linux/init.h> | 60 | #include <linux/init.h> |
| 61 | #include <linux/rcupdate.h> | 61 | #include <linux/rcupdate.h> |
| 62 | #include <linux/slab.h> | ||
| 62 | #ifdef CONFIG_SYSCTL | 63 | #ifdef CONFIG_SYSCTL |
| 63 | #include <linux/sysctl.h> | 64 | #include <linux/sysctl.h> |
| 64 | #endif | 65 | #endif |
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c index 7854052be60b..6a68a74d14a3 100644 --- a/net/ipv6/netfilter/ip6_queue.c +++ b/net/ipv6/netfilter/ip6_queue.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/proc_fs.h> | 25 | #include <linux/proc_fs.h> |
| 26 | #include <linux/seq_file.h> | 26 | #include <linux/seq_file.h> |
| 27 | #include <linux/mutex.h> | 27 | #include <linux/mutex.h> |
| 28 | #include <linux/slab.h> | ||
| 28 | #include <net/net_namespace.h> | 29 | #include <net/net_namespace.h> |
| 29 | #include <net/sock.h> | 30 | #include <net/sock.h> |
| 30 | #include <net/ipv6.h> | 31 | #include <net/ipv6.h> |
diff --git a/net/ipv6/netfilter/ip6t_REJECT.c b/net/ipv6/netfilter/ip6t_REJECT.c index dd8afbaf00a8..39b50c3768e8 100644 --- a/net/ipv6/netfilter/ip6t_REJECT.c +++ b/net/ipv6/netfilter/ip6t_REJECT.c | |||
| @@ -15,6 +15,7 @@ | |||
| 15 | * 2 of the License, or (at your option) any later version. | 15 | * 2 of the License, or (at your option) any later version. |
| 16 | */ | 16 | */ |
| 17 | 17 | ||
| 18 | #include <linux/gfp.h> | ||
| 18 | #include <linux/module.h> | 19 | #include <linux/module.h> |
| 19 | #include <linux/skbuff.h> | 20 | #include <linux/skbuff.h> |
| 20 | #include <linux/icmpv6.h> | 21 | #include <linux/icmpv6.h> |
diff --git a/net/ipv6/netfilter/ip6table_filter.c b/net/ipv6/netfilter/ip6table_filter.c index 36b72cafc227..d6fc9aff3163 100644 --- a/net/ipv6/netfilter/ip6table_filter.c +++ b/net/ipv6/netfilter/ip6table_filter.c | |||
| @@ -12,6 +12,7 @@ | |||
| 12 | #include <linux/module.h> | 12 | #include <linux/module.h> |
| 13 | #include <linux/moduleparam.h> | 13 | #include <linux/moduleparam.h> |
| 14 | #include <linux/netfilter_ipv6/ip6_tables.h> | 14 | #include <linux/netfilter_ipv6/ip6_tables.h> |
| 15 | #include <linux/slab.h> | ||
| 15 | 16 | ||
| 16 | MODULE_LICENSE("GPL"); | 17 | MODULE_LICENSE("GPL"); |
| 17 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); | 18 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); |
diff --git a/net/ipv6/netfilter/ip6table_mangle.c b/net/ipv6/netfilter/ip6table_mangle.c index 7844e557c0ec..6a102b57f356 100644 --- a/net/ipv6/netfilter/ip6table_mangle.c +++ b/net/ipv6/netfilter/ip6table_mangle.c | |||
| @@ -10,6 +10,7 @@ | |||
| 10 | */ | 10 | */ |
| 11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
| 12 | #include <linux/netfilter_ipv6/ip6_tables.h> | 12 | #include <linux/netfilter_ipv6/ip6_tables.h> |
| 13 | #include <linux/slab.h> | ||
| 13 | 14 | ||
| 14 | MODULE_LICENSE("GPL"); | 15 | MODULE_LICENSE("GPL"); |
| 15 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); | 16 | MODULE_AUTHOR("Netfilter Core Team <coreteam@netfilter.org>"); |
diff --git a/net/ipv6/netfilter/ip6table_raw.c b/net/ipv6/netfilter/ip6table_raw.c index aef31a29de9e..5b9926a011bd 100644 --- a/net/ipv6/netfilter/ip6table_raw.c +++ b/net/ipv6/netfilter/ip6table_raw.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | */ | 5 | */ |
| 6 | #include <linux/module.h> | 6 | #include <linux/module.h> |
| 7 | #include <linux/netfilter_ipv6/ip6_tables.h> | 7 | #include <linux/netfilter_ipv6/ip6_tables.h> |
| 8 | #include <linux/slab.h> | ||
| 8 | 9 | ||
| 9 | #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT)) | 10 | #define RAW_VALID_HOOKS ((1 << NF_INET_PRE_ROUTING) | (1 << NF_INET_LOCAL_OUT)) |
| 10 | 11 | ||
| @@ -13,7 +14,7 @@ static const struct xt_table packet_raw = { | |||
| 13 | .valid_hooks = RAW_VALID_HOOKS, | 14 | .valid_hooks = RAW_VALID_HOOKS, |
| 14 | .me = THIS_MODULE, | 15 | .me = THIS_MODULE, |
| 15 | .af = NFPROTO_IPV6, | 16 | .af = NFPROTO_IPV6, |
| 16 | .priority = NF_IP6_PRI_FIRST, | 17 | .priority = NF_IP6_PRI_RAW, |
| 17 | }; | 18 | }; |
| 18 | 19 | ||
| 19 | /* The work comes in here from netfilter.c. */ | 20 | /* The work comes in here from netfilter.c. */ |
diff --git a/net/ipv6/netfilter/ip6table_security.c b/net/ipv6/netfilter/ip6table_security.c index 0824d865aa9b..91aa2b4d83c9 100644 --- a/net/ipv6/netfilter/ip6table_security.c +++ b/net/ipv6/netfilter/ip6table_security.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | */ | 17 | */ |
| 18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
| 19 | #include <linux/netfilter_ipv6/ip6_tables.h> | 19 | #include <linux/netfilter_ipv6/ip6_tables.h> |
| 20 | #include <linux/slab.h> | ||
| 20 | 21 | ||
| 21 | MODULE_LICENSE("GPL"); | 22 | MODULE_LICENSE("GPL"); |
| 22 | MODULE_AUTHOR("James Morris <jmorris <at> redhat.com>"); | 23 | MODULE_AUTHOR("James Morris <jmorris <at> redhat.com>"); |
diff --git a/net/ipv6/netfilter/nf_conntrack_reasm.c b/net/ipv6/netfilter/nf_conntrack_reasm.c index f1171b744650..dd5b9bd61c62 100644 --- a/net/ipv6/netfilter/nf_conntrack_reasm.c +++ b/net/ipv6/netfilter/nf_conntrack_reasm.c | |||
| @@ -27,6 +27,7 @@ | |||
| 27 | #include <linux/ipv6.h> | 27 | #include <linux/ipv6.h> |
| 28 | #include <linux/icmpv6.h> | 28 | #include <linux/icmpv6.h> |
| 29 | #include <linux/random.h> | 29 | #include <linux/random.h> |
| 30 | #include <linux/slab.h> | ||
| 30 | 31 | ||
| 31 | #include <net/sock.h> | 32 | #include <net/sock.h> |
| 32 | #include <net/snmp.h> | 33 | #include <net/snmp.h> |
diff --git a/net/ipv6/raw.c b/net/ipv6/raw.c index ed31c37c6e39..8763b1a0814a 100644 --- a/net/ipv6/raw.c +++ b/net/ipv6/raw.c | |||
| @@ -21,6 +21,7 @@ | |||
| 21 | #include <linux/errno.h> | 21 | #include <linux/errno.h> |
| 22 | #include <linux/types.h> | 22 | #include <linux/types.h> |
| 23 | #include <linux/socket.h> | 23 | #include <linux/socket.h> |
| 24 | #include <linux/slab.h> | ||
| 24 | #include <linux/sockios.h> | 25 | #include <linux/sockios.h> |
| 25 | #include <linux/net.h> | 26 | #include <linux/net.h> |
| 26 | #include <linux/in6.h> | 27 | #include <linux/in6.h> |
diff --git a/net/ipv6/reassembly.c b/net/ipv6/reassembly.c index a555156e9779..6d4292ff5854 100644 --- a/net/ipv6/reassembly.c +++ b/net/ipv6/reassembly.c | |||
| @@ -41,6 +41,7 @@ | |||
| 41 | #include <linux/random.h> | 41 | #include <linux/random.h> |
| 42 | #include <linux/jhash.h> | 42 | #include <linux/jhash.h> |
| 43 | #include <linux/skbuff.h> | 43 | #include <linux/skbuff.h> |
| 44 | #include <linux/slab.h> | ||
| 44 | 45 | ||
| 45 | #include <net/sock.h> | 46 | #include <net/sock.h> |
| 46 | #include <net/snmp.h> | 47 | #include <net/snmp.h> |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 52cd3eff31dc..05ebd7833043 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
| @@ -40,6 +40,7 @@ | |||
| 40 | #include <linux/proc_fs.h> | 40 | #include <linux/proc_fs.h> |
| 41 | #include <linux/seq_file.h> | 41 | #include <linux/seq_file.h> |
| 42 | #include <linux/nsproxy.h> | 42 | #include <linux/nsproxy.h> |
| 43 | #include <linux/slab.h> | ||
| 43 | #include <net/net_namespace.h> | 44 | #include <net/net_namespace.h> |
| 44 | #include <net/snmp.h> | 45 | #include <net/snmp.h> |
| 45 | #include <net/ipv6.h> | 46 | #include <net/ipv6.h> |
| @@ -814,7 +815,7 @@ struct dst_entry * ip6_route_output(struct net *net, struct sock *sk, | |||
| 814 | { | 815 | { |
| 815 | int flags = 0; | 816 | int flags = 0; |
| 816 | 817 | ||
| 817 | if (rt6_need_strict(&fl->fl6_dst)) | 818 | if (fl->oif || rt6_need_strict(&fl->fl6_dst)) |
| 818 | flags |= RT6_LOOKUP_F_IFACE; | 819 | flags |= RT6_LOOKUP_F_IFACE; |
| 819 | 820 | ||
| 820 | if (!ipv6_addr_any(&fl->fl6_src)) | 821 | if (!ipv6_addr_any(&fl->fl6_src)) |
| @@ -879,7 +880,7 @@ static struct dst_entry *ip6_dst_check(struct dst_entry *dst, u32 cookie) | |||
| 879 | 880 | ||
| 880 | rt = (struct rt6_info *) dst; | 881 | rt = (struct rt6_info *) dst; |
| 881 | 882 | ||
| 882 | if (rt && rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) | 883 | if (rt->rt6i_node && (rt->rt6i_node->fn_sernum == cookie)) |
| 883 | return dst; | 884 | return dst; |
| 884 | 885 | ||
| 885 | return NULL; | 886 | return NULL; |
| @@ -890,12 +891,17 @@ static struct dst_entry *ip6_negative_advice(struct dst_entry *dst) | |||
| 890 | struct rt6_info *rt = (struct rt6_info *) dst; | 891 | struct rt6_info *rt = (struct rt6_info *) dst; |
| 891 | 892 | ||
| 892 | if (rt) { | 893 | if (rt) { |
| 893 | if (rt->rt6i_flags & RTF_CACHE) | 894 | if (rt->rt6i_flags & RTF_CACHE) { |
| 894 | ip6_del_rt(rt); | 895 | if (rt6_check_expired(rt)) { |
| 895 | else | 896 | ip6_del_rt(rt); |
| 897 | dst = NULL; | ||
| 898 | } | ||
| 899 | } else { | ||
| 896 | dst_release(dst); | 900 | dst_release(dst); |
| 901 | dst = NULL; | ||
| 902 | } | ||
| 897 | } | 903 | } |
| 898 | return NULL; | 904 | return dst; |
| 899 | } | 905 | } |
| 900 | 906 | ||
| 901 | static void ip6_link_failure(struct sk_buff *skb) | 907 | static void ip6_link_failure(struct sk_buff *skb) |
diff --git a/net/ipv6/sit.c b/net/ipv6/sit.c index b1eea811be48..5abae10cd884 100644 --- a/net/ipv6/sit.c +++ b/net/ipv6/sit.c | |||
| @@ -28,6 +28,7 @@ | |||
| 28 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
| 29 | #include <linux/if_arp.h> | 29 | #include <linux/if_arp.h> |
| 30 | #include <linux/icmp.h> | 30 | #include <linux/icmp.h> |
| 31 | #include <linux/slab.h> | ||
| 31 | #include <asm/uaccess.h> | 32 | #include <asm/uaccess.h> |
| 32 | #include <linux/init.h> | 33 | #include <linux/init.h> |
| 33 | #include <linux/netfilter_ipv4.h> | 34 | #include <linux/netfilter_ipv4.h> |
diff --git a/net/ipv6/sysctl_net_ipv6.c b/net/ipv6/sysctl_net_ipv6.c index f841d93bf987..fa1d8f4e0051 100644 --- a/net/ipv6/sysctl_net_ipv6.c +++ b/net/ipv6/sysctl_net_ipv6.c | |||
| @@ -9,6 +9,7 @@ | |||
| 9 | #include <linux/sysctl.h> | 9 | #include <linux/sysctl.h> |
| 10 | #include <linux/in6.h> | 10 | #include <linux/in6.h> |
| 11 | #include <linux/ipv6.h> | 11 | #include <linux/ipv6.h> |
| 12 | #include <linux/slab.h> | ||
| 12 | #include <net/ndisc.h> | 13 | #include <net/ndisc.h> |
| 13 | #include <net/ipv6.h> | 14 | #include <net/ipv6.h> |
| 14 | #include <net/addrconf.h> | 15 | #include <net/addrconf.h> |
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index 9b6dbba80d31..075f540ec197 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
| @@ -38,6 +38,7 @@ | |||
| 38 | #include <linux/jhash.h> | 38 | #include <linux/jhash.h> |
| 39 | #include <linux/ipsec.h> | 39 | #include <linux/ipsec.h> |
| 40 | #include <linux/times.h> | 40 | #include <linux/times.h> |
| 41 | #include <linux/slab.h> | ||
| 41 | 42 | ||
| 42 | #include <linux/ipv6.h> | 43 | #include <linux/ipv6.h> |
| 43 | #include <linux/icmpv6.h> | 44 | #include <linux/icmpv6.h> |
| @@ -1014,7 +1015,7 @@ static void tcp_v6_send_response(struct sk_buff *skb, u32 seq, u32 ack, u32 win, | |||
| 1014 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); | 1015 | skb_reserve(buff, MAX_HEADER + sizeof(struct ipv6hdr) + tot_len); |
| 1015 | 1016 | ||
| 1016 | t1 = (struct tcphdr *) skb_push(buff, tot_len); | 1017 | t1 = (struct tcphdr *) skb_push(buff, tot_len); |
| 1017 | skb_reset_transport_header(skb); | 1018 | skb_reset_transport_header(buff); |
| 1018 | 1019 | ||
| 1019 | /* Swap the send and the receive. */ | 1020 | /* Swap the send and the receive. */ |
| 1020 | memset(t1, 0, sizeof(*t1)); | 1021 | memset(t1, 0, sizeof(*t1)); |
diff --git a/net/ipv6/tunnel6.c b/net/ipv6/tunnel6.c index e17bc1dfc1a4..fc3c86a47452 100644 --- a/net/ipv6/tunnel6.c +++ b/net/ipv6/tunnel6.c | |||
| @@ -25,6 +25,7 @@ | |||
| 25 | #include <linux/mutex.h> | 25 | #include <linux/mutex.h> |
| 26 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
| 27 | #include <linux/skbuff.h> | 27 | #include <linux/skbuff.h> |
| 28 | #include <linux/slab.h> | ||
| 28 | #include <net/ipv6.h> | 29 | #include <net/ipv6.h> |
| 29 | #include <net/protocol.h> | 30 | #include <net/protocol.h> |
| 30 | #include <net/xfrm.h> | 31 | #include <net/xfrm.h> |
diff --git a/net/ipv6/udp.c b/net/ipv6/udp.c index 3c0c9c755c92..90824852f598 100644 --- a/net/ipv6/udp.c +++ b/net/ipv6/udp.c | |||
| @@ -34,6 +34,7 @@ | |||
| 34 | #include <linux/init.h> | 34 | #include <linux/init.h> |
| 35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
| 36 | #include <linux/skbuff.h> | 36 | #include <linux/skbuff.h> |
| 37 | #include <linux/slab.h> | ||
| 37 | #include <asm/uaccess.h> | 38 | #include <asm/uaccess.h> |
| 38 | 39 | ||
| 39 | #include <net/ndisc.h> | 40 | #include <net/ndisc.h> |
| @@ -258,8 +259,8 @@ static struct sock *__udp6_lib_lookup(struct net *net, | |||
| 258 | if (hslot->count < hslot2->count) | 259 | if (hslot->count < hslot2->count) |
| 259 | goto begin; | 260 | goto begin; |
| 260 | 261 | ||
| 261 | result = udp6_lib_lookup2(net, &in6addr_any, sport, | 262 | result = udp6_lib_lookup2(net, saddr, sport, |
| 262 | daddr, hnum, dif, | 263 | &in6addr_any, hnum, dif, |
| 263 | hslot2, slot2); | 264 | hslot2, slot2); |
| 264 | } | 265 | } |
| 265 | rcu_read_unlock(); | 266 | rcu_read_unlock(); |
diff --git a/net/ipv6/xfrm6_mode_tunnel.c b/net/ipv6/xfrm6_mode_tunnel.c index 3927832227b9..b809812c8d30 100644 --- a/net/ipv6/xfrm6_mode_tunnel.c +++ b/net/ipv6/xfrm6_mode_tunnel.c | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | * Copyright (c) 2004-2006 Herbert Xu <herbert@gondor.apana.org.au> | 5 | * Copyright (c) 2004-2006 Herbert Xu <herbert@gondor.apana.org.au> |
| 6 | */ | 6 | */ |
| 7 | 7 | ||
| 8 | #include <linux/gfp.h> | ||
| 8 | #include <linux/init.h> | 9 | #include <linux/init.h> |
| 9 | #include <linux/kernel.h> | 10 | #include <linux/kernel.h> |
| 10 | #include <linux/module.h> | 11 | #include <linux/module.h> |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index ae181651c75a..00bf7c962b7e 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
| @@ -124,7 +124,7 @@ static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev, | |||
| 124 | xdst->u.dst.dev = dev; | 124 | xdst->u.dst.dev = dev; |
| 125 | dev_hold(dev); | 125 | dev_hold(dev); |
| 126 | 126 | ||
| 127 | xdst->u.rt6.rt6i_idev = in6_dev_get(rt->u.dst.dev); | 127 | xdst->u.rt6.rt6i_idev = in6_dev_get(dev); |
| 128 | if (!xdst->u.rt6.rt6i_idev) | 128 | if (!xdst->u.rt6.rt6i_idev) |
| 129 | return -ENODEV; | 129 | return -ENODEV; |
| 130 | 130 | ||
diff --git a/net/ipv6/xfrm6_tunnel.c b/net/ipv6/xfrm6_tunnel.c index fa85a7d22dc4..2ce3a8278f26 100644 --- a/net/ipv6/xfrm6_tunnel.c +++ b/net/ipv6/xfrm6_tunnel.c | |||
| @@ -23,6 +23,7 @@ | |||
| 23 | */ | 23 | */ |
| 24 | #include <linux/module.h> | 24 | #include <linux/module.h> |
| 25 | #include <linux/xfrm.h> | 25 | #include <linux/xfrm.h> |
| 26 | #include <linux/slab.h> | ||
| 26 | #include <linux/rculist.h> | 27 | #include <linux/rculist.h> |
| 27 | #include <net/ip.h> | 28 | #include <net/ip.h> |
| 28 | #include <net/xfrm.h> | 29 | #include <net/xfrm.h> |
