[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lwip-users] Re: [lwip] Question about ip_input
From: |
David Haas |
Subject: |
[lwip-users] Re: [lwip] Question about ip_input |
Date: |
Thu, 09 Jan 2003 00:33:47 -0000 |
OK, how about this: (using my own form of pseudo code)
netif = null
for netif list:
if address match or broadcast match netif is set
if netif is still null
Test for dhcp
else (dhcp)
forward packet
Do we really need to test for an interface with a zero address. I notice
that the DHCP code is setting netif to inp, so we are ultimately ignoring
the zero interface. Let the DHCP high-level protocol ignore the unwanted
DHCP packet if it get's one and we did not initiate a request.
What do you think?
David.
By the way, you could skip the entire netif lookup by using the routing
table. I have some example code which does this. It is more suitable for a
router implementation.
----- Original Message -----
From: "Leon Woestenberg" <address@hidden>
To: <address@hidden>
Sent: Tuesday, December 10, 2002 7:15 PM
Subject: Re: [lwip] Question about ip_input
> Hello David,
>
> > in ip_input:
> > if(ip_addr_isany(&(netif->ip_addr)) ||
> > Why is one of the criteria ip_addr_isany(&(netif->ip_addr)) ?
> >
> We must accept packets for the DHCP negotiation process for an
unconfigured
> interface.
>
> However, the filter can be much more restrictive.
>
> Also, the filter seems not to work for 2 unconfigured interfaces, as the
> first one always
> matches.
>
> This filter must be rewritten. Let's first define in pseudo-code what it
> should do.
>
> Regards,
>
> Leon.
>
> [This message was sent through the lwip discussion list.]
[This message was sent through the lwip discussion list.]