diff options
author | 2019-01-23 08:23:18 +0000 | |
---|---|---|
committer | 2019-01-23 08:23:18 +0000 | |
commit | e4d551d4c8169bebab1ba46988c6c260ab58858b (patch) | |
tree | 606cca47f60c1a79f52f2cb5f45a913fedfef440 | |
parent | Sanitize scp filenames via snmprintf. To do this we move the (diff) | |
download | wireguard-openbsd-e4d551d4c8169bebab1ba46988c6c260ab58858b.tar.xz wireguard-openbsd-e4d551d4c8169bebab1ba46988c6c260ab58858b.zip |
add a SIOCGPWE3 ioctl for interfaces to advertise pwe3 capability
im going to turn mpw into an ethernet interface, which includes
changing its if_type to IFT_ETHER. currently ldpd looks for if_type
IFT_MPLSTUNNEL to decide if an interface is a pseudowire, ie, it's
going to break. the ioctl will let ldpd ask the interface if it is
pseudowire capable as an alternative.
ok claudio@
-rw-r--r-- | sys/net/if.h | 6 | ||||
-rw-r--r-- | sys/sys/sockio.h | 3 |
2 files changed, 7 insertions, 2 deletions
diff --git a/sys/net/if.h b/sys/net/if.h index 7bb0378ac5b..8606cb982ef 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if.h,v 1.198 2018/11/12 23:34:48 dlg Exp $ */ +/* $OpenBSD: if.h,v 1.199 2019/01/23 08:23:18 dlg Exp $ */ /* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */ /* @@ -420,6 +420,7 @@ struct ifreq { #define ifr_index ifr_ifru.ifru_index /* interface index */ #define ifr_llprio ifr_ifru.ifru_metric /* link layer priority */ #define ifr_hdrprio ifr_ifru.ifru_metric /* header prio field config */ +#define ifr_pwe3 ifr_ifru.ifru_metric /* PWE3 type */ }; #define IF_HDRPRIO_MIN IFQ_MINPRIO @@ -427,6 +428,9 @@ struct ifreq { #define IF_HDRPRIO_PACKET -1 /* use mbuf prio */ #define IF_HDRPRIO_PAYLOAD -2 /* copy payload prio */ +#define IF_PWE3_ETHERNET 1 /* ethernet or ethernet tagged */ +#define IF_PWE3_IP 2 /* IP layer 2 */ + struct ifaliasreq { char ifra_name[IFNAMSIZ]; /* if name, e.g. "en0" */ union { diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h index 923875a3540..5f584d54554 100644 --- a/sys/sys/sockio.h +++ b/sys/sys/sockio.h @@ -1,4 +1,4 @@ -/* $OpenBSD: sockio.h,v 1.78 2018/11/29 00:11:23 dlg Exp $ */ +/* $OpenBSD: sockio.h,v 1.79 2019/01/23 08:23:18 dlg Exp $ */ /* $NetBSD: sockio.h,v 1.5 1995/08/23 00:40:47 thorpej Exp $ */ /*- @@ -143,6 +143,7 @@ #define SIOCSSPPPPARAMS _IOW('i', 147, struct ifreq) /* set pppoe params */ #define SIOCGSPPPPARAMS _IOWR('i', 148, struct ifreq) /* get pppoe params */ +#define SIOCGPWE3 _IOWR('i', 152, struct ifreq) /* get MPLS PWE3 cap */ #define SIOCSETLABEL _IOW('i', 153, struct ifreq) /* set MPLS label */ #define SIOCGETLABEL _IOW('i', 154, struct ifreq) /* get MPLS label */ |