summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>2001-11-23 19:20:45 +0000
committerbrian <brian@FreeBSD.org>2001-11-23 19:20:45 +0000
commit244dad812b571068b6a4e319a506933e747914a9 (patch)
tree943afb75370dc9847b6cfb8a4127e29684da6993 /usr.sbin
parent1d5e042937b176d831548ada0a5cc90c3ab425d7 (diff)
downloadFreeBSD-src-244dad812b571068b6a4e319a506933e747914a9.zip
FreeBSD-src-244dad812b571068b6a4e319a506933e747914a9.tar.gz
Remove the hack that ensures that rt_Update() works on FreeBSD. Now
that the ncpaddr code doesn't create default routes with non-zero masks, everything works as it should.
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/ppp/route.c28
1 files changed, 5 insertions, 23 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index 791f098..b083ca6 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -867,29 +867,11 @@ rt_Update(struct bundle *bundle, const struct sockaddr *dst,
rtmes.m_rtm.rtm_addrs |= RTA_DST;
p += memcpy_roundup(p, dst, dst->sa_len);
}
-
-#ifdef __FreeBSD__
- /*
- * In order to update the default route under FreeBSD, only the destination
- * address should be specified. If the (empty) mask or the gateway
- * address are used, the update fails...
- * Conversely, if the gateway and mask are omitted under OpenBSD, the
- * update will fail.
- */
- if (dst)
- ncprange_setsa(&ncpdst, dst, mask);
- else
- ncprange_init(&ncpdst);
-
- if (!ncprange_isdefault(&ncpdst))
-#endif
- {
- 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_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