lwip-devel
[Top][All Lists]
Advanced

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

Re: [lwip-devel] etharp.c updating


From: Simon Goldschmidt
Subject: Re: [lwip-devel] etharp.c updating
Date: Sun, 12 Jun 2011 23:27:19 +0200

Hi Leon,

I think you might have been looking at the wrong function there:
etharp_ip_input handles incoming IP packets, whereas the lines you cited 
comment about incoming ARP packets. These are handled in etharp_arp_input.

Normally, etharp_ip_input is not used at all, since it is regarded the minimum 
anti-spoof level to not update the ARP cache on incoming non-ARP packets. Also, 
doing so would have significant performance drawbacks.

Simon


Leon Woestenberg <address@hidden>:

> Hello,
> 
> etharp.c version 1.162: "Fixed ARP input processing: only add a new
> entry if a request was directed as us (RFC 826, Packet Reception),
> otherwise only update existing entries; internalized some functions"
> 
> changes:
> 
> etharp_ip_input(struct netif *netif, struct pbuf *p)
> <...>
>  update_arp_entry(netif, &(iphdr->src), &(ethhdr->src), 0);
> 
> to:
> 
> etharp_ip_input(struct netif *netif, struct pbuf *p)
> <...>
>  update_arp_entry(netif, &(iphdr->src), &(ethhdr->src), ETHARP_FIND_ONLY);
> 
> However, I think the former behaviour (update on any ARP) was correct:
> 
>         "As specified in [36], any node receiving any ARP packet (Request
>         or Reply) MUST update its local ARP cache with the Sender
>         Protocol and Hardware Addresses in the ARP packet, if the
>         receiving node has an entry for that IP address already in its
>         ARP cache.  This requirement in the ARP protocol applies even
>         for ARP Request packets, and for ARP Reply packets that do not
>         match any ARP Request transmitted by the receiving node [36]"
> 
>   [36]  Plummer, D., "Ethernet Address Resolution Protocol: Or
>         converting network protocol addresses to 48.bit Ethernet
>         address for transmission on Ethernet hardware", STD 37, RFC
>         826, November 1982.
> 
> 
> Regards,
> -- 
> Leon
> 
> _______________________________________________
> lwip-devel mailing list
> address@hidden
> https://lists.nongnu.org/mailman/listinfo/lwip-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]