summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2009-09-14 22:19:47 +0000
committerqingli <qingli@FreeBSD.org>2009-09-14 22:19:47 +0000
commit47af097237cbb465c2d13a4591dd02db0b164a44 (patch)
tree4c2dffe3cecddcae11bd81be693f8576af7848eb
parentb42234781e560a31aff4c38731a53a1fbfac9a44 (diff)
downloadFreeBSD-src-47af097237cbb465c2d13a4591dd02db0b164a44.zip
FreeBSD-src-47af097237cbb465c2d13a4591dd02db0b164a44.tar.gz
Previously local end of point-to-point interface is not reachable
within the system that owns the interface. Packets destined to the local end point leak to the wire towards the default gateway if one exists. This behavior is changed as part of the L2/L3 rewrite efforts. The local end point is now reachable within the system. The inpcb code needs to consider this fact during the address selection process. Reviewed by: bz MFC after: immediately
-rw-r--r--sys/netinet/in_pcb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/netinet/in_pcb.c b/sys/netinet/in_pcb.c
index 525afef..7a4ac10 100644
--- a/sys/netinet/in_pcb.c
+++ b/sys/netinet/in_pcb.c
@@ -701,6 +701,8 @@ in_pcbladdr(struct inpcb *inp, struct in_addr *faddr, struct in_addr *laddr,
ia = ifatoia(ifa_ifwithdstaddr(sintosa(&sain)));
if (ia == NULL)
ia = ifatoia(ifa_ifwithnet(sintosa(&sain)));
+ if (ia == NULL)
+ ia = ifatoia(ifa_ifwithaddr(sintosa(&sain)));
if (cred == NULL || !prison_flag(cred, PR_IP4)) {
if (ia == NULL) {
OpenPOWER on IntegriCloud