From 32a52e9e397e0124ed525ccd222914d3c1b16b57 Mon Sep 17 00:00:00 2001 From: Navdeep Parhar Date: Fri, 17 Aug 2018 01:03:23 +0000 Subject: [PATCH] if_vlan(4): A VLAN always has a PCP and its ifnet's if_pcp should be set to the PCP value in use instead of IFNET_PCP_NONE. MFC after: 1 week Sponsored by: Chelsio Communications --- sys/net/if_vlan.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c index 97f0671dfe6f..11baf8a018b4 100644 --- a/sys/net/if_vlan.c +++ b/sys/net/if_vlan.c @@ -1435,6 +1435,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint16_t vid) ifp->if_resolvemulti = p->if_resolvemulti; ifp->if_addrlen = p->if_addrlen; ifp->if_broadcastaddr = p->if_broadcastaddr; + ifp->if_pcp = ifv->ifv_pcp; /* * Copy only a selected subset of flags from the parent. @@ -1959,6 +1960,7 @@ vlan_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; } ifv->ifv_pcp = ifr->ifr_vlan_pcp; + ifp->if_pcp = ifv->ifv_pcp; vlan_tag_recalculate(ifv); /* broadcast event about PCP change */ EVENTHANDLER_INVOKE(ifnet_event, ifp, IFNET_EVENT_PCP);