summaryrefslogtreecommitdiff
path: root/usr.sbin/ppp
diff options
context:
space:
mode:
authorbrian <brian@cvs.openbsd.org>2001-11-23 19:21:37 +0000
committerbrian <brian@cvs.openbsd.org>2001-11-23 19:21:37 +0000
commit6df9f030ceddc8afca7343c0bfe949a027e08212 (patch)
tree75f0bd858d40cb39ac9e68d5305593c72c085693 /usr.sbin/ppp
parentd2ace76d9ca442123dab5a909ac2a611ec803f22 (diff)
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/ppp')
-rw-r--r--usr.sbin/ppp/ppp/route.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/usr.sbin/ppp/ppp/route.c b/usr.sbin/ppp/ppp/route.c
index 1c36189641c..630eaab06c6 100644
--- a/usr.sbin/ppp/ppp/route.c
+++ b/usr.sbin/ppp/ppp/route.c
@@ -25,7 +25,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $OpenBSD: route.c,v 1.21 2001/11/23 17:12:20 brian Exp $
+ * $OpenBSD: route.c,v 1.22 2001/11/23 19:21:36 brian Exp $
*/
#include <sys/param.h>
@@ -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;