]> git.ozlabs.org Git - ppp.git/blobdiff - modules/if_ppp.c
update for 2.3.9
[ppp.git] / modules / if_ppp.c
index 852fd242e6cea0052b975965f358537044b311f7..4a0dcb4a3b62552ef0b15ff77425a60f6ae9d3c1 100644 (file)
@@ -24,7 +24,7 @@
  * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
  * OR MODIFICATIONS.
  *
- * $Id: if_ppp.c,v 1.11 1999/03/02 05:37:32 paulus Exp $
+ * $Id: if_ppp.c,v 1.15 1999/07/23 07:07:34 paulus Exp $
  */
 
 /*
@@ -290,12 +290,14 @@ if_ppp_wput(q, mp)
                ifp->if_unit = unit;
                ifp->if_mtu = PPP_MTU;
                ifp->if_flags = IFF_POINTOPOINT | IFF_RUNNING;
+#ifndef __osf__
 #ifdef IFF_MULTICAST
                ifp->if_flags |= IFF_MULTICAST;
 #endif
+#endif /* __osf__ */
                ifp->if_output = if_ppp_output;
 #ifdef __osf__
-               ifp->if_version = "Point-to-Point Protocol, version 2.3.6";
+               ifp->if_version = "Point-to-Point Protocol, version 2.3.9";
                ifp->if_mediamtu = PPP_MTU;
                ifp->if_type = IFT_PPP;
                ifp->if_hdrlen = PPP_HDRLEN;
@@ -584,6 +586,7 @@ if_ppp_ioctl(ifp, cmd, data)
     int s, error;
     struct ifreq *ifr = (struct ifreq *) data;
     struct ifaddr *ifa = (struct ifaddr *) data;
+    u_short mtu;
 
     error = 0;
     s = splimp();
@@ -606,6 +609,15 @@ if_ppp_ioctl(ifp, cmd, data)
     case SIOCSIFMTU:
        if ((error = NOTSUSER()) != 0)
            break;
+#ifdef __osf__
+       /* this hack is necessary because ifioctl checks ifr_data
+        * in 4.0 and 5.0, but ifr_data and ifr_metric overlay each 
+        * other in the definition of struct ifreq so pppd can't set both.
+        */
+        bcopy(ifr->ifr_data, &mtu, sizeof (u_short));
+        ifr->ifr_mtu = mtu;
+#endif
+
        if (ifr->ifr_mtu < PPP_MINMTU || ifr->ifr_mtu > PPP_MAXMTU) {
            error = EINVAL;
            break;