diff options
author | YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org> | 2006-09-22 17:43:49 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-09-22 18:20:25 -0400 |
commit | fbea49e1e2404baa2d88ab47e2db89e49551b53b (patch) | |
tree | 7e11746b350048e04867a9f67b843057428c2ef0 /net/ipv6/ndisc.c | |
parent | 62dd93181aaa1d5a501a9cebcb254f44b8a48af7 (diff) |
[IPV6] NDISC: Add proxy_ndp sysctl.
We do not always need proxy NDP functionality even we
enable forwarding.
Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6/ndisc.c')
-rw-r--r-- | net/ipv6/ndisc.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index ddf038636f01..76517a5f6576 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -824,6 +824,7 @@ static void ndisc_recv_ns(struct sk_buff *skb) | |||
824 | 824 | ||
825 | if (ipv6_chk_acast_addr(dev, &msg->target) || | 825 | if (ipv6_chk_acast_addr(dev, &msg->target) || |
826 | (idev->cnf.forwarding && | 826 | (idev->cnf.forwarding && |
827 | (ipv6_devconf.proxy_ndp || idev->cnf.proxy_ndp) && | ||
827 | (pneigh = pneigh_lookup(&nd_tbl, | 828 | (pneigh = pneigh_lookup(&nd_tbl, |
828 | &msg->target, dev, 0)) != NULL)) { | 829 | &msg->target, dev, 0)) != NULL)) { |
829 | if (!(NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED) && | 830 | if (!(NEIGH_CB(skb)->flags & LOCALLY_ENQUEUED) && |
@@ -966,8 +967,13 @@ static void ndisc_recv_na(struct sk_buff *skb) | |||
966 | * has already sent a NA to us. | 967 | * has already sent a NA to us. |
967 | */ | 968 | */ |
968 | if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) && | 969 | if (lladdr && !memcmp(lladdr, dev->dev_addr, dev->addr_len) && |
969 | pneigh_lookup(&nd_tbl, &msg->target, dev, 0)) | 970 | ipv6_devconf.forwarding && ipv6_devconf.proxy_ndp && |
971 | pneigh_lookup(&nd_tbl, &msg->target, dev, 0)) { | ||
972 | /* XXX: idev->cnf.prixy_ndp */ | ||
973 | WARN_ON(skb->dst != NULL && | ||
974 | ((struct rt6_info *)skb->dst)->rt6i_idev); | ||
970 | goto out; | 975 | goto out; |
976 | } | ||
971 | 977 | ||
972 | neigh_update(neigh, lladdr, | 978 | neigh_update(neigh, lladdr, |
973 | msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, | 979 | msg->icmph.icmp6_solicited ? NUD_REACHABLE : NUD_STALE, |