In in_pcbconnect_setup() remove a check that route points at

loopback interface. Nobody have explained me sense of this check.
It breaks connect() system call to a destination address which is
loopback routed (e.g. blackholed).

Reviewed by:	silence on net@
MFC after:	2 weeks
This commit is contained in:
Gleb Smirnoff 2005-02-22 07:39:15 +00:00
parent 0db8fa8984
commit 914d092f5d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=142206

View file

@ -619,11 +619,9 @@ in_pcbconnect_setup(inp, nam, laddrp, lportp, faddrp, fportp, oinpp, cred)
}
/*
* If we found a route, use the address
* corresponding to the outgoing interface
* unless it is the loopback (in case a route
* to our address on another net goes to loopback).
* corresponding to the outgoing interface.
*/
if (sro.ro_rt && !(sro.ro_rt->rt_ifp->if_flags & IFF_LOOPBACK))
if (sro.ro_rt)
ia = ifatoia(sro.ro_rt->rt_ifa);
if (sro.ro_rt)
RTFREE(sro.ro_rt);