summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorqingli <qingli@FreeBSD.org>2008-12-19 01:37:20 +0000
committerqingli <qingli@FreeBSD.org>2008-12-19 01:37:20 +0000
commitfba34872ecb4a70ea6cebcc3e9c772b8d676df27 (patch)
tree27cf8a149ea452b4ff57e5702c4406dea6eb7252 /usr.sbin/ppp
parent7aaeeb07043adcd94c535d5c394f69f9c560c4ad (diff)
downloadFreeBSD-src-fba34872ecb4a70ea6cebcc3e9c772b8d676df27.zip
FreeBSD-src-fba34872ecb4a70ea6cebcc3e9c772b8d676df27.tar.gz
The ppp application relies on the if_tun interface to properly
install a p2p host route between the end points. The ppp module upates this router based on user configuration later on. The rt_Update() seems to always set the RTF_GATEWAY flag, which is broken.
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r--usr.sbin/ppp/route.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index f5efe63..7609681 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -910,8 +910,10 @@ rt_Update(struct bundle *bundle, const struct sockaddr *dst,
p += memcpy_roundup(p, dst, dst->sa_len);
}
- rtmes.m_rtm.rtm_addrs |= RTA_GATEWAY;
+ if (gw != NULL && (gw->sa_family != AF_LINK))
+ 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);
OpenPOWER on IntegriCloud