4.2 ip source route bug?

Rob Hagens hagens at uwvax.UUCP
Thu Jan 24 01:44:10 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.

Looking at the ip code, in ip_input.c, in function ip_dooptions,
at case label IPOPT_LSRR:

The next hop in the source route is placed into struct ipaddr.
Then a check is made to see if this address corresponds to any interface:

	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).

Looking at the function if_ifwithaddr(), it appears that it checks 14 bytes
of internet address. I am confused here. One would think that the only
portion of the address to check is the net, not the entire address, let
alone 14 bytes! (see the #define equal in the if_ifwithaddr()).

Does anyone know whats going on here. I'd like a second opinion before I
change this stuff.

Rob Hagens
-- 
Rob Hagens @ wisconsin
...!{allegra,heurikon,ihnp4,seismo,sfwin,ucbvax,uwm-evax}!uwvax!hagens
hagens at wisc-rsch.arpa



More information about the Comp.unix.wizards mailing list