diff options
-rw-r--r-- | sys/net/if.c | 6 | ||||
-rw-r--r-- | sys/net/if.h | 3 | ||||
-rw-r--r-- | sys/net/if_gre.c | 5 | ||||
-rw-r--r-- | sys/net/if_spppsubr.c | 7 | ||||
-rw-r--r-- | sys/sys/sockio.h | 4 |
5 files changed, 20 insertions, 5 deletions
diff --git a/sys/net/if.c b/sys/net/if.c index b6ccd30202f..b0a3cb87c13 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if.c,v 1.247 2012/10/23 17:41:00 claudio Exp $ */ +/* $OpenBSD: if.c,v 1.248 2012/11/23 20:12:03 sthen Exp $ */ /* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */ /* @@ -1268,6 +1268,10 @@ ifioctl(struct socket *so, u_long cmd, caddr_t data, struct proc *p) ifr->ifr_mtu = ifp->if_mtu; break; + case SIOCGIFHARDMTU: + ifr->ifr_hardmtu = ifp->if_hardmtu; + break; + case SIOCGIFDATA: error = copyout((caddr_t)&ifp->if_data, ifr->ifr_data, sizeof(ifp->if_data)); diff --git a/sys/net/if.h b/sys/net/if.h index e00ffa3dc98..0cf96f90ece 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.136 2012/11/11 04:45:37 deraadt Exp $ */ +/* $OpenBSD: if.h,v 1.137 2012/11/23 20:12:03 sthen Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -639,6 +639,7 @@ struct ifreq { #define ifr_flags ifr_ifru.ifru_flags /* flags */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_metric /* mtu (overload) */ +#define ifr_hardmtu ifr_ifru.ifru_metric /* hardmtu (overload) */ #define ifr_media ifr_ifru.ifru_metric /* media options (overload) */ #define ifr_rdomainid ifr_ifru.ifru_metric /* VRF instance (overload) */ #define ifr_data ifr_ifru.ifru_data /* for use by interface */ diff --git a/sys/net/if_gre.c b/sys/net/if_gre.c index 88f3ba3bd3c..7a9eeee4a49 100644 --- a/sys/net/if_gre.c +++ b/sys/net/if_gre.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_gre.c,v 1.58 2012/04/14 09:39:47 yasuoka Exp $ */ +/* $OpenBSD: if_gre.c,v 1.59 2012/11/23 20:12:03 sthen Exp $ */ /* $NetBSD: if_gre.c,v 1.9 1999/10/25 19:18:11 drochner Exp $ */ /* @@ -475,6 +475,9 @@ gre_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) case SIOCGIFMTU: ifr->ifr_mtu = sc->sc_if.if_mtu; break; + case SIOCGIFHARDMTU: + ifr->ifr_hardmtu = sc->sc_if.if_hardmtu; + break; case SIOCADDMULTI: case SIOCDELMULTI: if (ifr == 0) { diff --git a/sys/net/if_spppsubr.c b/sys/net/if_spppsubr.c index 8e505949ad5..91a365262c4 100644 --- a/sys/net/if_spppsubr.c +++ b/sys/net/if_spppsubr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_spppsubr.c,v 1.98 2012/07/24 15:16:20 deraadt Exp $ */ +/* $OpenBSD: if_spppsubr.c,v 1.99 2012/11/23 20:12:03 sthen Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. * Keepalive protocol implemented in both Cisco and PPP modes. @@ -1117,6 +1117,11 @@ sppp_ioctl(struct ifnet *ifp, u_long cmd, void *data) ifr->ifr_mtu = ifp->if_mtu; break; #endif +#ifdef SIOCGIFHARDMTU + case SIOCGIFHARDMTU: + ifr->ifr_hardmtu = ifp->if_hardmtu; + break; +#endif #ifdef SLIOCGETMTU case SLIOCGETMTU: *(short*)data = ifp->if_mtu; diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index 3b512b373b7..313cd7ff424 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sockio.h,v 1.49 2011/11/26 23:38:18 haesbaert Exp $ */ +/* $OpenBSD: sockio.h,v 1.50 2012/11/23 20:12:03 sthen Exp $ */ /* $NetBSD: sockio.h,v 1.5 1995/08/23 00:40:47 thorpej Exp $ */ /*- @@ -181,6 +181,8 @@ #define SIOCSETKALIVE _IOW('i', 163, struct ifkalivereq) #define SIOCGETKALIVE _IOWR('i', 164, struct ifkalivereq) +#define SIOCGIFHARDMTU _IOWR('i', 165, struct ifreq) /* get ifnet hardmtu */ + #define SIOCSVH _IOWR('i', 245, struct ifreq) /* set carp param */ #define SIOCGVH _IOWR('i', 246, struct ifreq) /* get carp param */ |