Subject: Re: Problems with outgoing routing of UDP packets
To: None <tech-net@netbsd.org>
From: Tom Ivar Helbekkmo <tih@eunetnorge.no>
List: tech-net
Date: 04/22/2004 10:57:12
I've noticed that in_losing() is never called for UDP traffic -- it is
only invoked on TCP timeouts.  A bit of debug output showed me where
my EADDRNOTAVAILs were being generated, and, sure enough, it's related
to cached routing information.  The following patch is obviously not
the correct fix, but it does solve my problem: I can now use Coda with
my laptop while roaming between different networks, some on UTP, some
wireless.  I'll be running with this for now, but would be happy to
test anything someone comes up with as a better solution.

*** in_pcb.c.~1.94.~	Tue Mar  2 03:26:28 2004
--- in_pcb.c	Thu Apr 22 10:43:50 2004
***************
*** 434,442 ****
  			return error;
  		}
  		INADDR_TO_IA(ifaddr->sin_addr, ia);
! 		if (ia == NULL)
  			return (EADDRNOTAVAIL);
  	}
  	if (in_pcblookup_connect(inp->inp_table, sin->sin_addr, sin->sin_port,
  	    !in_nullhost(inp->inp_laddr) ? inp->inp_laddr : ifaddr->sin_addr,
  	    inp->inp_lport) != 0)
--- 434,444 ----
  			return error;
  		}
  		INADDR_TO_IA(ifaddr->sin_addr, ia);
! 		if (ia == NULL) {
! 			in_losing(inp);
  			return (EADDRNOTAVAIL);
  		}
+ 	}
  	if (in_pcblookup_connect(inp->inp_table, sin->sin_addr, sin->sin_port,
  	    !in_nullhost(inp->inp_laddr) ? inp->inp_laddr : ifaddr->sin_addr,
  	    inp->inp_lport) != 0)


-tih
-- 
Tom Ivar Helbekkmo, Senior System Administrator, EUnet Norway
www.eunet.no  T: +47-22092958 M: +47-93013940 F: +47-22092901