]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-bsd.c
When adding a default route, make the route static. Since this is a ``manually
[ppp.git] / pppd / sys-bsd.c
index 46962dec0ff63af5f04993646f8d5349b4875d00..12bbdde79ea41d27c6aeb6f2305646a10f48823c 100644 (file)
@@ -21,8 +21,9 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-bsd.c,v 1.29 1997/11/27 06:10:04 paulus Exp $";
+static char rcsid[] = "$Id: sys-bsd.c,v 1.32 1998/09/02 20:58:13 christos Exp $";
 /*     $NetBSD: sys-bsd.c,v 1.1.1.3 1997/09/26 18:53:04 christos Exp $ */
+#endif
 
 /*
  * TODO:
@@ -62,9 +63,13 @@ static char rcsid[] = "$Id: sys-bsd.c,v 1.29 1997/11/27 06:10:04 paulus Exp $";
 #if defined(NetBSD) && (NetBSD >= 199703)
 #include <netinet/if_inarp.h>
 #else  /* NetBSD 1.2D or later */
+#ifdef __FreeBSD__
+#include <netinet/if_ether.h>
+#else
 #include <net/if_ether.h>
 #endif
 #endif
+#endif
 
 #include "pppd.h"
 #include "fsm.h"
@@ -1055,7 +1060,7 @@ dodefaultroute(g, cmd)
 
     memset(&rtmsg, 0, sizeof(rtmsg));
     rtmsg.hdr.rtm_type = cmd == 's'? RTM_ADD: RTM_DELETE;
-    rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY;
+    rtmsg.hdr.rtm_flags = RTF_UP | RTF_GATEWAY | RTF_STATIC;
     rtmsg.hdr.rtm_version = RTM_VERSION;
     rtmsg.hdr.rtm_seq = ++rtm_seq;
     rtmsg.hdr.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;
@@ -1389,6 +1394,15 @@ GetMask(addr)
     return mask;
 }
 
+/*
+ * Use the hostid as part of the random number seed.
+ */
+int
+get_host_seed()
+{
+    return gethostid();
+}
+
 /*
  * lock - create a lock file for the named lock device
  */