proxy_arp as DHCP fail-safe solution

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




I have modified arp.c in order avoid responses to arp requests when the 
source IP is equal that the target IP and Proxy-ARP is enabled.
This feature will support to hosts with static IP even when the address 
are topologically incorrect.
With 'iptables rules',  'ip routes' and 'proxy_arp' it is posible to 
connect a machine with 'incorrect IP' in our internal network and this 
computer will use internet without problems.
This is usefull as a  DHCP Fail-safe mechanism (windows assign an IP to 
the interface when dhcpd is  not contacted) or when a mobile client 
without adm privilegies can't change his/her static IP.
Without this patch windows respond with an error message when proxy_arp 
is enabled (The system has detected a conflict for IP .....).


Manolo

********************************* CUT ****************
--- linux.org/net/ipv4/arp.c    Fri Sep  7 20:01:20 2001
+++ linux/net/ipv4/arp.c        Wed Aug 21 15:44:14 2002
@@ -773,9 +773,9 @@
                               if (n)
                                       neigh_release(n);

-                               if (skb->stamp.tv_sec == 0 ||
+                               if ( sip != tip && (skb->stamp.tv_sec == 
0 ||
                                   skb->pkt_type == PACKET_HOST ||
-                                   in_dev->arp_parms->proxy_delay == 0) {
+                                   in_dev->arp_parms->proxy_delay == 0) ) {
                                       
arp_send(ARPOP_REPLY,ETH_P_ARP,sip,dev,tip,sha,dev->dev_addr,sha);
                               } else {
                                       pneigh_enqueue(&arp_tbl, 
in_dev->arp_parms, skb);
******************************* END CUT ***************

-
: send the line "unsubscribe linux-net" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]

  Powered by Linux