Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 17 Aug 2018 01:03:23 +0000 (UTC)
From:      Navdeep Parhar <np@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r337943 - head/sys/net
Message-ID:  <201808170103.w7H13Nl5047960@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: np
Date: Fri Aug 17 01:03:23 2018
New Revision: 337943
URL: https://svnweb.freebsd.org/changeset/base/337943

Log:
  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

Modified:
  head/sys/net/if_vlan.c

Modified: head/sys/net/if_vlan.c
==============================================================================
--- head/sys/net/if_vlan.c	Fri Aug 17 00:49:35 2018	(r337942)
+++ head/sys/net/if_vlan.c	Fri Aug 17 01:03:23 2018	(r337943)
@@ -1435,6 +1435,7 @@ vlan_config(struct ifvlan *ifv, struct ifnet *p, uint1
 	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);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201808170103.w7H13Nl5047960>