summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorRandall Stewart <rrs@FreeBSD.org>2013-04-25 21:55:29 +0000
committerRandall Stewart <rrs@FreeBSD.org>2013-04-25 21:55:29 +0000
commit3944c1881df4cfb2b6bbd958fa6576ec780ec83e (patch)
tree7b5bc59c377c1ac806a15c541fdd479b021d5381 /sys
parentb99f9165eb8710b8a35f5973abd2d992fecda8a2 (diff)
MFC of r249848:
This fixes the issue with the "randomly changing" default route. What it was is there are two places in ip_output.c where we do a goto again. One place was fine, it copies out the new address and then resets dst = ro->rt_dst; But the other place does *not* do that, which means earlier when we found the gateway, we have dst pointing there aka dst = ro->rt_gateway is done.. then we do a goto again.. bam now we clobber the default route. The fix is just to move the again so we are always doing dst = &ro->rt_dst; in the again loop. Approved by: re@freebsd.org (Josh Paetzel)
Notes
svn path=/releng/8.4/; revision=249907
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_output.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index 8d7ce79dcbbf..6108b26706b5 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -197,8 +197,8 @@ ip_output(struct mbuf *m, struct mbuf *opt, struct route *ro, int flags,
hlen = ip->ip_hl << 2;
}
- dst = (struct sockaddr_in *)&ro->ro_dst;
again:
+ dst = (struct sockaddr_in *)&ro->ro_dst;
/*
* If there is a cached route,
* check that it is to the same destination