summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorChristiano F. Haesbaert <haesbaert@cvs.openbsd.org>2011-11-26 23:38:19 +0000
committerChristiano F. Haesbaert <haesbaert@cvs.openbsd.org>2011-11-26 23:38:19 +0000
commit1416d0fcb10efdae5963d8244fb1f055c8fbfb6a (patch)
tree86bdc3e28566e12317b14f96c8a3724b01fd1b9f /sbin
parentac64bde8bae57cee5646d0180c5064340b18bebb (diff)
Tie the 802.1p (CoS) value in vlan(4) with the new prio scheme in pf.
When transmitting through vlan(4), it will now use the prio value in pf packet header. When receiving, we save the incoming Cos in the same place, this gives us the hability to preserve the CoS value across two different vlan interfaces. This kills the SIOC[GS]VLANPRIO ioctls and removes the corresponding buttons from ifconfig(8). ok henning@ claudio@ mcbride@
Diffstat (limited to 'sbin')
-rw-r--r--sbin/ifconfig/ifconfig.c42
1 files changed, 3 insertions, 39 deletions
diff --git a/sbin/ifconfig/ifconfig.c b/sbin/ifconfig/ifconfig.c
index 7030997542b..e33f3051392 100644
--- a/sbin/ifconfig/ifconfig.c
+++ b/sbin/ifconfig/ifconfig.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ifconfig.c,v 1.251 2011/11/02 02:03:47 haesbaert Exp $ */
+/* $OpenBSD: ifconfig.c,v 1.252 2011/11/26 23:38:18 haesbaert Exp $ */
/* $NetBSD: ifconfig.c,v 1.40 1997/10/01 02:19:43 enami Exp $ */
/*
@@ -188,7 +188,6 @@ void settimeslot(const char *, int);
void timeslot_status(void);
void setmpelabel(const char *, int);
void setvlantag(const char *, int);
-void setvlanprio(const char *, int);
void setvlandev(const char *, int);
void unsetvlandev(const char *, int);
void mpe_status(void);
@@ -362,7 +361,6 @@ const struct cmd {
{ "-carppeer", 1, 0, unsetcarppeer },
{ "pass", NEXTARG, 0, setcarp_passwd },
{ "vhid", NEXTARG, 0, setcarp_vhid },
- { "vlanprio", NEXTARG, 0, setvlanprio },
{ "state", NEXTARG, 0, setcarp_state },
{ "carpdev", NEXTARG, 0, setcarpdev },
{ "carpnodes", NEXTARG, 0, setcarp_nodes },
@@ -466,7 +464,6 @@ const struct cmd {
{ "priority", NEXTARG, 0, setignore },
{ "rtlabel", NEXTARG, 0, setignore },
{ "mpls", IFXF_MPLS, 0, setignore },
- { "vlanprio", NEXTARG, 0, setignore },
{ "txpower", NEXTARG, 0, setignore },
{ "nwflag", NEXTARG, 0, setignore },
{ "rdomain", NEXTARG, 0, setignore },
@@ -3238,7 +3235,6 @@ void
vlan_status(void)
{
struct vlanreq vreq;
- struct vlanreq preq;
bzero((char *)&vreq, sizeof(struct vlanreq));
ifr.ifr_data = (caddr_t)&vreq;
@@ -3246,15 +3242,9 @@ vlan_status(void)
if (ioctl(s, SIOCGETVLAN, (caddr_t)&ifr) == -1)
return;
- bzero(&preq, sizeof(struct vlanreq));
- ifr.ifr_data = (caddr_t)&preq;
-
- if (ioctl(s, SIOCGETVLANPRIO, (caddr_t)&ifr) == -1)
- return;
-
if (vreq.vlr_tag || (vreq.vlr_parent[0] != '\0'))
- printf("\tvlan: %d priority: %d parent interface: %s\n",
- vreq.vlr_tag, preq.vlr_tag, vreq.vlr_parent[0] == '\0' ?
+ printf("\tvlan: %d parent interface: %s\n",
+ vreq.vlr_tag, vreq.vlr_parent[0] == '\0' ?
"<none>" : vreq.vlr_parent);
}
@@ -3283,32 +3273,6 @@ setvlantag(const char *val, int d)
err(1, "SIOCSETVLAN");
}
-#ifndef SMALL
-/* ARGSUSED */
-void
-setvlanprio(const char *val, int d)
-{
- u_int16_t prio;
- struct vlanreq vreq;
- const char *errmsg = NULL;
-
- prio = strtonum(val, 0, 7, &errmsg);
- if (errmsg)
- errx(1, "vlan priority %s: %s", val, errmsg);
-
- bzero(&vreq, sizeof(struct vlanreq));
- ifr.ifr_data = (caddr_t)&vreq;
-
- if (ioctl(s, SIOCGETVLANPRIO, (caddr_t)&ifr) == -1)
- err(1, "SIOCGETVLANPRIO");
-
- vreq.vlr_tag = prio;
-
- if (ioctl(s, SIOCSETVLANPRIO, (caddr_t)&ifr) == -1)
- err(1, "SIOCSETVLANPRIO");
-}
-#endif
-
/* ARGSUSED */
void
setvlandev(const char *val, int d)