o connect(2): if there is no a route to the destination

do not pick up the first local ip address for the source
ip address, return ENETUNREACH instead.

Submitted by:	Gleb Smirnoff
Reviewed by:	-current (silence)
This commit is contained in:
Maxim Konovalov 2004-06-16 10:02:36 +00:00
parent 89c9c53da0
commit ef14c36965
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130590

View File

@ -614,9 +614,7 @@ in_pcbconnect_setup(inp, nam, laddrp, lportp, faddrp, fportp, oinpp, cred)
if (ia == 0)
ia = ifatoia(ifa_ifwithnet(sintosa(&sa)));
if (ia == 0)
ia = TAILQ_FIRST(&in_ifaddrhead);
if (ia == 0)
return (EADDRNOTAVAIL);
return (ENETUNREACH);
}
/*
* If the destination address is multicast and an outgoing