aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorBjoern A. Zeeb <bz@FreeBSD.org>2009-04-20 11:22:51 +0000
committerBjoern A. Zeeb <bz@FreeBSD.org>2009-04-20 11:22:51 +0000
commit16f37cbd72984d3e25a2324dee9f4d099acfee00 (patch)
tree46b74e482705acdce65344fc39ad2c0ec9602c51 /usr.sbin/ppp
parent2cbf101b17b627249bc6dc949b1b260199dd91a7 (diff)
downloadsrc-16f37cbd72984d3e25a2324dee9f4d099acfee00.tar.gz
src-16f37cbd72984d3e25a2324dee9f4d099acfee00.zip
Back out r186308:
in case of AF_LINK, which the kernel still returns for an RTAX_GATEWAY as an empty sockaddr_dl in the classic tun<n> case. Copying the address into the message payload, but not the RTA_GATEWAY flag results in rt_xaddrs() in the kernel tripping over that and parsing the next attribute set with a flag, i.e. RTA_NETMASK, with the gateway address, resulting in bogus route entry. MFC after: 3 days
Notes
Notes: svn path=/head/; revision=191305
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/route.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index 7609681a9edf..f5efe639f8c6 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -910,10 +910,8 @@ rt_Update(struct bundle *bundle, const struct sockaddr *dst,
p += memcpy_roundup(p, dst, dst->sa_len);
}
- if (gw != NULL && (gw->sa_family != AF_LINK))
- rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
+ 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);