From 6423ccba925d17bcd2293bf5ef6fcaf37cd3ea66 Mon Sep 17 00:00:00 2001 From: brian Date: Fri, 30 Nov 2001 14:01:20 +0000 Subject: 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 --- usr.sbin/ppp/route.c | 6 ------ 1 file changed, 6 deletions(-) (limited to 'usr.sbin') 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; -- cgit v1.1