From a361452ba60086e37d1776522ab3ea1f7e153e9d Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Mon, 6 Jun 2016 08:03:15 -0300 Subject: Partially revert "Importing pfSense patch pf_802.1p.diff" Revert all non-pf part of this patch since it was applied in FreeBSD on r301496 This reverts commit 16407834ee23d84ea0b8ad652c67248f05410040. --- sbin/ifconfig/ifvlan.c | 37 ++++++------------------------------- 1 file changed, 6 insertions(+), 31 deletions(-) (limited to 'sbin') diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index 3b37160..107b87b 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -1,10 +1,6 @@ /* - * Copyright (c) 1999 Bill Paul - * Copyright (c) 2012 ADARA Networks, Inc. - * All rights reserved. - * - * Portions of this software were developed by Robert N. M. Watson under - * contract to ADARA Networks, Inc. + * Copyright (c) 1999 + * Bill Paul . All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -82,14 +78,10 @@ vlan_status(int s) { struct vlanreq vreq; - if (getvlan(s, &ifr, &vreq) == -1) - return; - printf("\tvlan: %d", vreq.vlr_tag); - if (ioctl(s, SIOCGVLANPCP, (caddr_t)&ifr) != -1) - printf(" vlanpcp: %u", ifr.ifr_vlan_pcp); - printf(" parent interface: %s", vreq.vlr_parent[0] == '\0' ? - "" : vreq.vlr_parent); - printf("\n"); + if (getvlan(s, &ifr, &vreq) != -1) + printf("\tvlan: %d parent interface: %s\n", + vreq.vlr_tag, vreq.vlr_parent[0] == '\0' ? + "" : vreq.vlr_parent); } static void @@ -157,22 +149,6 @@ DECL_CMD_FUNC(setvlandev, val, d) } static -DECL_CMD_FUNC(setvlanpcp, val, d) -{ - u_long ul; - char *endp; - - ul = strtoul(val, &endp, 0); - if (*endp != '\0') - errx(1, "invalid value for vlanpcp"); - if (ul > 7) - errx(1, "value for vlanpcp out of range"); - ifr.ifr_vlan_pcp = ul; - if (ioctl(s, SIOCSVLANPCP, (caddr_t)&ifr) == -1) - err(1, "SIOCSVLANPCP"); -} - -static DECL_CMD_FUNC(unsetvlandev, val, d) { struct vlanreq vreq; @@ -193,7 +169,6 @@ DECL_CMD_FUNC(unsetvlandev, val, d) static struct cmd vlan_cmds[] = { DEF_CLONE_CMD_ARG("vlan", setvlantag), DEF_CLONE_CMD_ARG("vlandev", setvlandev), - DEF_CMD_ARG("vlanpcp", setvlanpcp), /* NB: non-clone cmds */ DEF_CMD_ARG("vlan", setvlantag), DEF_CMD_ARG("vlandev", setvlandev), -- cgit v1.1