]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-osf.c
mods to get it to compile better on linux
[ppp.git] / pppd / sys-osf.c
index c25c5163fadb65bd81e63df82c2b029c8b91eecc..42acdd85fb6b7ff0017716e8ee45ecacc9a0f162 100644 (file)
@@ -26,7 +26,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-osf.c,v 1.10 1996/07/01 01:20:17 paulus Exp $";
+static char rcsid[] = "$Id: sys-osf.c,v 1.12 1997/04/30 05:58:44 paulus Exp $";
 #endif
 
 #include <stdio.h>
@@ -182,7 +182,7 @@ sys_cleanup()
     if (ifaddrs[0])
        cifaddr(0, ifaddrs[0], ifaddrs[1]);
     if (default_route_gateway)
-       cifdefaultroute(0, default_route_gateway);
+       cifdefaultroute(0, 0, default_route_gateway);
     if (proxy_arp_addr)
        cifproxyarp(0, proxy_arp_addr);
 }
@@ -750,7 +750,7 @@ output(unit, p, len)
     struct pollfd pfd;
 
     if (debug)
-       log_packet(p, len, "sent ");
+       log_packet(p, len, "sent ", LOG_DEBUG);
 
     data.len = len;
     data.buf = (caddr_t) p;
@@ -981,6 +981,8 @@ ccp_test(unit, opt_ptr, opt_len, for_transmit)
            break;
         wait_time(&tval);
     }
+    if (errno != 0)
+       syslog(LOG_ERR, "hard failure trying to get memory for a compressor: %m");
     return (errno == ENOSR)? 0: -1;
 }
 
@@ -1186,6 +1188,12 @@ sifaddr(u, o, h, m)
         ret = 0;
     }
 
+    ifr.ifr_metric = link_mtu;
+    if (ioctl(sockfd, SIOCSIPMTU, &ifr) < 0) {
+       syslog(LOG_ERR, "Couldn't set IP MTU: %m");
+        ret = 0;
+    }
+
     ifaddrs[0] = o;
     ifaddrs[1] = h;
     return (ret);
@@ -1220,9 +1228,9 @@ cifaddr(u, o, h)
  * sifdefaultroute - assign a default route through the address given.
  */
 int
-sifdefaultroute(u, g)
+sifdefaultroute(u, l, g)
     int u;
-    u_int32_t g;
+    u_int32_t l, g;
 {
     struct ortentry rt;
 
@@ -1244,9 +1252,9 @@ sifdefaultroute(u, g)
  * cifdefaultroute - delete a default route through the address given.
  */
 int
-cifdefaultroute(u, g)
+cifdefaultroute(u, l, g)
     int u;
-    u_int32_t g;
+    u_int32_t l, g;
 {
     struct ortentry rt;
 
@@ -1398,9 +1406,9 @@ get_ether_addr(ipaddr, hwaddr)
 
 #define        WTMPFILE        "/usr/adm/wtmp"
 
-int
+void
 logwtmp(line, name, host)
-    char *line, *name, *host;
+    const char *line, *name, *host;
 {
     int fd;
     struct stat buf;