CheckIPHeader vs bootp/dhcp

Eddie Kohler kohler at icir.org
Wed Apr 16 16:39:01 EDT 2003


You're right about the CheckIPHeader bug. I'm not sure about the best way
to fix it. In your local copy (or, hell, even in the global CVS), might as
well take 0.0.0.0 out of the list of BADADDRS. But I tend to think the
correct solution is to remove the BADADDRS argument, and replace it with a
list of ROUTERADDRS, which are IP address/prefix pairs (e.g. 18.26.4.1/24).
>From that list, CheckIPHeader could figure out the invalid broadcast
addresses (e.g. 18.26.4.255) AND the "good" destination addresses to which
invalid-source packets should still be allowed (e.g. 18.26.4.1). Comments?

E


> Hi,
> I was trying to use dhcp with a click router but CheckIPHeader was rejecting 
> dhcp discover packets since they have a source addr of 0.0.0.0.
> 
> RFC 1812 says the following:
> 
> 
> ...
> 
>  We now summarize the important special cases for general purpose
>    unicast IP addresses, using the following notation for an IP address:
> 
>     { <Network-prefix>, <Host-number> }
> 
>    and the notation -1 for a field that contains all 1 bits and the
>    notation 0 for a field that contains all 0 bits.
> 
>    (a) { 0, 0 }
> 
>         This host on this network.  It MUST NOT be used as a source
>         address by routers, except the router MAY use this as a source
>         address as part of an initialization procedure (e.g., if the
>         router is using BOOTP to load its configuration information).
> 
>         Incoming datagrams with a source address of { 0, 0 } which are
>         received for local delivery (see Section [5.2.3]), MUST be
>         accepted if the router implements the associated protocol and
>         that protocol clearly defines appropriate action to be taken.
>         Otherwise, a router MUST silently discard any locally-delivered
>         datagram whose source address is { 0, 0 }.
> 
> 
> ...
> 
> 
> I didn't know if either CheckIPHeader should be changed or if a GOODADDRS argument
> should be added so I could allow 0.0.0.0
> 
> 
> -jbicket





More information about the click mailing list