diff options
author | rrs <rrs@FreeBSD.org> | 2013-04-24 18:30:32 +0000 |
---|---|---|
committer | rrs <rrs@FreeBSD.org> | 2013-04-24 18:30:32 +0000 |
commit | d90354b0198e919d53ae959bea342067b74d33b8 (patch) | |
tree | c483a219b94e84d2fe3d58e7d44835e01fe009b1 /sys/netinet | |
parent | 4094a2fb730132e8ca6ca3fa3f2f1a5e5582a286 (diff) | |
download | FreeBSD-src-d90354b0198e919d53ae959bea342067b74d33b8.zip FreeBSD-src-d90354b0198e919d53ae959bea342067b74d33b8.tar.gz |
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.
PR: 174749,157796
MFC after: 1 week
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_output.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c index fd418e9..120fe22 100644 --- a/sys/netinet/ip_output.c +++ b/sys/netinet/ip_output.c @@ -196,8 +196,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; ia = NULL; /* * If there is a cached route, |