summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2013-08-15 09:18:37 +0000
committermpi <mpi@openbsd.org>2013-08-15 09:18:37 +0000
commite8207c20cc729ca0498a60f6df9b50d642e6c2ff (patch)
tree34e3a48bc0b405a0f3e81a9846824234c64e6f35 /sys
parentInclude files.agp and files.drm from files.pci. Makes sure "drm.h" gets (diff)
downloadwireguard-openbsd-e8207c20cc729ca0498a60f6df9b50d642e6c2ff.tar.xz
wireguard-openbsd-e8207c20cc729ca0498a60f6df9b50d642e6c2ff.zip
Stop defining SIOC{S,G}ETVLAN as SIOC{S,G}IFGENERIC because they
are two differents ioctls manipulating structures of a different size. In particular this prevents vlan(4) to handle pppoe(4)-specific ioctls and vice versa, that could lead to smashing the stack of the caller. Issue originally found by David Hill when compiling ifconfig with clang. Note that this is an ABI break but we're riding a biger dragon right now. ok mikeb@, kettenis@, sthen@
Diffstat (limited to 'sys')
-rw-r--r--sys/net/if_vlan_var.h4
-rw-r--r--sys/sys/sockio.h5
2 files changed, 4 insertions, 5 deletions
diff --git a/sys/net/if_vlan_var.h b/sys/net/if_vlan_var.h
index a1d2679671b..ae65ddca217 100644
--- a/sys/net/if_vlan_var.h
+++ b/sys/net/if_vlan_var.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_vlan_var.h,v 1.20 2010/06/03 16:15:00 naddy Exp $ */
+/* $OpenBSD: if_vlan_var.h,v 1.21 2013/08/15 09:18:37 mpi Exp $ */
/*
* Copyright 1998 Massachusetts Institute of Technology
@@ -95,8 +95,6 @@ struct vlanreq {
char vlr_parent[IFNAMSIZ];
u_short vlr_tag;
};
-#define SIOCSETVLAN SIOCSIFGENERIC
-#define SIOCGETVLAN SIOCGIFGENERIC
#ifdef _KERNEL
extern int vlan_input(struct ether_header *eh, struct mbuf *m);
diff --git a/sys/sys/sockio.h b/sys/sys/sockio.h
index 313cd7ff424..f464ede2492 100644
--- a/sys/sys/sockio.h
+++ b/sys/sys/sockio.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: sockio.h,v 1.50 2012/11/23 20:12:03 sthen Exp $ */
+/* $OpenBSD: sockio.h,v 1.51 2013/08/15 09:18:37 mpi Exp $ */
/* $NetBSD: sockio.h,v 1.5 1995/08/23 00:40:47 thorpej Exp $ */
/*-
@@ -161,7 +161,8 @@
#define SIOCSIFTIMESLOT _IOW('i', 133, struct ifreq) /* set ifnet timeslot */
#define SIOCGIFTIMESLOT _IOWR('i', 134, struct ifreq) /* get ifnet timeslot */
-/* 143 and 144 (SIOC[GS]VLANPRIO) were removed, do not reuse it before 5.1 */
+#define SIOCSETVLAN _IOW('i', 143, struct ifreq) /* set vlan parent if */
+#define SIOCGETVLAN _IOWR('i', 144, struct ifreq) /* get vlan parent if */
#define SIOCSETLABEL _IOW('i', 153, struct ifreq) /* set MPLS label */
#define SIOCGETLABEL _IOW('i', 154, struct ifreq) /* get MPLS label */