diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-06-28 01:17:11 -0400 |
---|---|---|
committer | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2008-07-03 04:51:55 -0400 |
commit | 778d80be52699596bf70e0eb0761cf5e1e46088d (patch) | |
tree | 607d0bd6fe7c7d6f59d88b9287fc534f6693998d /net/ipv6/ip6_input.c | |
parent | 5ce83afaac956238c3c25f60a899c511e9d8cbf4 (diff) |
ipv6: Add disable_ipv6 sysctl to disable IPv6 operaion on specific interface.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Diffstat (limited to 'net/ipv6/ip6_input.c')
-rw-r--r-- | net/ipv6/ip6_input.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv6/ip6_input.c b/net/ipv6/ip6_input.c index 34e5a96623ae..ea81c614dde2 100644 --- a/net/ipv6/ip6_input.c +++ b/net/ipv6/ip6_input.c | |||
@@ -71,7 +71,8 @@ int ipv6_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt | |||
71 | 71 | ||
72 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INRECEIVES); | 72 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INRECEIVES); |
73 | 73 | ||
74 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL) { | 74 | if ((skb = skb_share_check(skb, GFP_ATOMIC)) == NULL || |
75 | !idev || unlikely(idev->cnf.disable_ipv6)) { | ||
75 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INDISCARDS); | 76 | IP6_INC_STATS_BH(idev, IPSTATS_MIB_INDISCARDS); |
76 | rcu_read_unlock(); | 77 | rcu_read_unlock(); |
77 | goto out; | 78 | goto out; |