summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-11-30 14:01:20 +0000
committerbrian <brian@FreeBSD.org>2001-11-30 14:01:20 +0000
commit6423ccba925d17bcd2293bf5ef6fcaf37cd3ea66 (patch)
tree2e7ae0464fb426675a7185a5ada7174453a08138 /usr.sbin
parent496e7d9901ec551004cccad170034da79461ec12 (diff)
downloadFreeBSD-src-6423ccba925d17bcd2293bf5ef6fcaf37cd3ea66.zip
FreeBSD-src-6423ccba925d17bcd2293bf5ef6fcaf37cd3ea66.tar.gz
Don't provide an RTA_GATEWAY sockaddr when we write RTM_CHANGE messages
to the routing socket. The local address on a point-to-point interface is not actually a gateway address - despite it appearing in the second column of netstat -r's output. Providing a gateway to an RTM_CHANGE will currently change the route's interface so that it's using the specified gateway - not what we want. Patiently explained to me by: ru
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/route.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index b083ca6..5f0f662 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -867,12 +867,6 @@ rt_Update(struct bundle *bundle, const struct sockaddr *dst,
rtmes.m_rtm.rtm_addrs |= RTA_DST;
p += memcpy_roundup(p, dst, dst->sa_len);
}
- rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
- p += memcpy_roundup(p, gw, gw->sa_len);
- if (mask) {
- rtmes.m_rtm.rtm_addrs |= RTA_NETMASK;
- p += memcpy_roundup(p, mask, mask->sa_len);
- }
rtmes.m_rtm.rtm_msglen = p - (char *)&rtmes;
OpenPOWER on IntegriCloud