lkml.org 
[lkml]   [1999]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] interface checking ARP
Date
After the discussions in the "ARP (mis)behavior" thread I decided to go
ahead and try to change the ARP behavior. It was easier than I expected,
this patch forces ARP requests to be ignored unless they are received on an
interface configured to the target IP. I'd be interested to hear if this
creates any problems - it seems to work well for me.


diff -u linux/net/ipv4/arp.c linux/net/ipv4/arp.new.c
--- linux/net/ipv4/arp.c Mon Aug 9 12:04:41 1999
+++ linux/net/ipv4/arp.new.c Mon Aug 23 08:28:24 1999
@@ -655,7 +655,8 @@
}

if (arp->ar_op == __constant_htons(ARPOP_REQUEST) &&
- ip_route_input(skb, tip, sip, 0, dev) == 0) {
+ ip_route_input(skb, tip, sip, 0, dev) == 0 &&
+ dev == ip_dev_find(tip)) {

rt = (struct rtable*)skb->dst;
addr_type = rt->rt_type;

Chris Leech
Intel Corporation
christopher.leech@intel.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:53    [W:0.323 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site