[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] Being notified of an address conflict when setting addr
From: |
Mason |
Subject: |
Re: [lwip-users] Being notified of an address conflict when setting address manually |
Date: |
Wed, 30 May 2012 16:10:07 +0200 |
User-agent: |
Mozilla/5.0 (Windows NT 5.1; rv:12.0) Gecko/20120429 Firefox/12.0 SeaMonkey/2.9.1 |
Simon Goldschmidt wrote:
> That's what I said: "where they are passed to DHCP", not "in dhcp.c"
> (i.e. add a call to your own function in etharp_arp_input() just
> after/before the call to dhcp_arp_reply() - in this function, check
> if the ARP response handles your IP address and react
> appropriately).
>
> I'd be happy if you could even provide a patch that does this check
> and calls an external function (e.g. etharp_address_collision(netif))
> if such a packet has been received. We could then easily integrate
> that into the stack.
For the record, this is how I solved my problem:
In my port, I defined
void check_address_conflict(struct netif *netif, ip_addr_t *addr)
{
if (netif->flags & NETIF_FLAG_DHCP) return;
if (ip_addr_cmp(addr, &netif->ip_addr))
{
/* NOTIFY ADDRESS CONFLICT TO END-USER */
}
}
In etharp_arp_input, I call
check_address_conflict(netif, &sipaddr);
after
dhcp_arp_reply(netif, &sipaddr);
Thanks for pointing me in the right direction, Simon.
--
Regards.
- [lwip-users] Being notified of an address conflict when setting address manually, Mason, 2012/05/25
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Bill Auerbach, 2012/05/25
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Mason, 2012/05/28
- Re: [lwip-users] Being notified of an address conflict when setting address manually, address@hidden, 2012/05/29
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Pomeroy, Marty, 2012/05/29
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Mason, 2012/05/30
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Simon Goldschmidt, 2012/05/30
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Pomeroy, Marty, 2012/05/30
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Mason, 2012/05/30
- Re: [lwip-users] Being notified of an address conflict when setting address manually, Simon Goldschmidt, 2012/05/30
- Re: [lwip-users] Being notified of an address conflict when setting address manually,
Mason <=