[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] patch etharp
From: |
Andreas Becker |
Subject: |
[lwip-users] patch etharp |
Date: |
Mon, 24 Jan 2005 11:04:21 +0100 |
Hi all,
im working on a DHCP extension to make it more RFC2131 compatible and able to
use DHCP-Reboot. ( Patch comming soon.)
I noticed an wrong behavior, if we do an DHCP_DOES_ARP_CHECK with an
unconfigured interface. First to assign an IP-number to our interface we have
to (ARP-)check it. The answer is then "for_us" with an unconfigured
Interface. But if we have an unconfigured Interface, the ARP-answer will not
be processed.
So I think it's better to check, if the Ethernet-MAC of the received packet
matches our MAC-address.
void
etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr, struct pbuf
*p)
{
....
/* this interface is not configured? */
#if 0
if (netif->ip_addr.addr == 0) {
for_us = 0;
} else {
/* ARP packet directed to us? */
for_us = ip_addr_cmp(&dipaddr, &(netif->ip_addr));
}
#else
if (memcmp(netif->hwaddr, ethaddr, netif->hwaddr_len) == 0 /*equal*/)
{
for_us = 1;
}
else
{
for_us = 0;
}
#endif
Regards,
--
MEng Dipl.-Ing.(FH) Andreas Becker
Entwicklung
dSys e.K.
Soeflinger Str. 100
D-89077 Ulm
Tel: +49.731.151579-1
Fax: +49.731.151579-9
web: www.dsys.de
- [lwip-users] patch etharp,
Andreas Becker <=