Author: rrs Date: Thu Apr 25 21:55:29 2013 New Revision: 249907 URL: http://svnweb.freebsd.org/changeset/base/249907
Log: 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: r...@freebsd.org (Josh Paetzel) Modified: releng/8.4/sys/netinet/ip_output.c Directory Properties: releng/8.4/sys/ (props changed) releng/8.4/sys/netinet/ (props changed) Modified: releng/8.4/sys/netinet/ip_output.c ============================================================================== --- releng/8.4/sys/netinet/ip_output.c Thu Apr 25 21:19:50 2013 (r249906) +++ releng/8.4/sys/netinet/ip_output.c Thu Apr 25 21:55:29 2013 (r249907) @@ -197,8 +197,8 @@ ip_output(struct mbuf *m, struct mbuf *o 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 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"