Skip to content

Commit

Permalink
[NETFILTER]: ipt_CLUSTERIP: fix ARP mangling
Browse files Browse the repository at this point in the history
This patch adds mangling of ARP requests (in addition to replies),
since ARP caches are made from snooping both requests and replies.

Signed-off-by: Harald Welte <laforge@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Harald Welte authored and David S. Miller committed Jun 28, 2005
1 parent 85c1937 commit 4095ebf
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions net/ipv4/netfilter/ipt_CLUSTERIP.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <linux/netfilter_ipv4/ipt_CLUSTERIP.h>
#include <linux/netfilter_ipv4/ip_conntrack.h>

#define CLUSTERIP_VERSION "0.6"
#define CLUSTERIP_VERSION "0.7"

#define DEBUG_CLUSTERIP

Expand Down Expand Up @@ -524,8 +524,9 @@ arp_mangle(unsigned int hook,
|| arp->ar_pln != 4 || arp->ar_hln != ETH_ALEN)
return NF_ACCEPT;

/* we only want to mangle arp replies */
if (arp->ar_op != htons(ARPOP_REPLY))
/* we only want to mangle arp requests and replies */
if (arp->ar_op != htons(ARPOP_REPLY)
&& arp->ar_op != htons(ARPOP_REQUEST))
return NF_ACCEPT;

payload = (void *)(arp+1);
Expand Down

0 comments on commit 4095ebf

Please sign in to comment.