summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Graf2012-02-10 05:07:11 +0100
committerDavid S. Miller2012-02-10 21:13:36 +0100
commit70620c46ac2b45c24b0f22002fdf5ddd1f7daf81 (patch)
tree1ca143be17f6c1e78b7740c5bb2a4a12b0d059a2
parentipv4: Fix wrong order of ip_rt_get_source() and update iph->daddr. (diff)
downloadkernel-qcow2-linux-70620c46ac2b45c24b0f22002fdf5ddd1f7daf81.tar.gz
kernel-qcow2-linux-70620c46ac2b45c24b0f22002fdf5ddd1f7daf81.tar.xz
kernel-qcow2-linux-70620c46ac2b45c24b0f22002fdf5ddd1f7daf81.zip
net: Don't proxy arp respond if iif == rt->dst.dev if private VLAN is disabled
Commit 653241 (net: RFC3069, private VLAN proxy arp support) changed the behavior of arp proxy to send arp replies back out on the interface the request came in even if the private VLAN feature is disabled. Previously we checked rt->dst.dev != skb->dev for in scenarios, when proxy arp is enabled on for the netdevice and also when individual proxy neighbour entries have been added. This patch adds the check back for the pneigh_lookup() scenario. Signed-off-by: Thomas Graf <tgraf@suug.ch> Acked-by: Jesper Dangaard Brouer <hawk@comx.dk> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/arp.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c
index 59402be133f0..63e49890ad31 100644
--- a/net/ipv4/arp.c
+++ b/net/ipv4/arp.c
@@ -863,7 +863,8 @@ static int arp_process(struct sk_buff *skb)
if (addr_type == RTN_UNICAST &&
(arp_fwd_proxy(in_dev, dev, rt) ||
arp_fwd_pvlan(in_dev, dev, rt, sip, tip) ||
- pneigh_lookup(&arp_tbl, net, &tip, dev, 0))) {
+ (rt->dst.dev != dev &&
+ pneigh_lookup(&arp_tbl, net, &tip, dev, 0)))) {
n = neigh_event_ns(&arp_tbl, sha, &sip, dev);
if (n)
neigh_release(n);