4.2 ip source route bug?

Chris Torek chris at umcp-cs.UUCP
Sun Jan 27 14:52:37 AEST 1985


> I have been having trouble getting 4.2 to forward source routed ip
> datagrams. It seems that once into 4.2 ip, they never get back out.
> [...]
> [in ip_input.c, for SSRR:]
>
>	ifp = if_ifwithaddr((struct sockaddr *)&ipaddr);
>
> If, when this function returns, ifp == 0, then the source route is
> aborted (ip_options returns without changing the destination address, and
> ip_input assumes the datagram is for the current host).

It's wrong; it should be if_ifwithnet((struct sockaddr *)&ipaddr).  (There
*is* an if_ifwithnet in the standard 4.2 code, there *has* to be...?)

> Looking at the function if_ifwithaddr(), it appears that it checks 14 bytes
> of internet address.

That if_ifwithaddr deals in 14 byte things is a whole different bug, and
doesn't affect AF_INET.
-- 
(This line accidently left nonblank.)

In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris at umcp-cs		ARPA:	chris at maryland



More information about the Comp.unix.wizards mailing list