From owner-svn-src-head@freebsd.org Fri Aug 24 21:48:13 2018 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D95741094877; Fri, 24 Aug 2018 21:48:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 905A0778FF; Fri, 24 Aug 2018 21:48:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7204B16BFF; Fri, 24 Aug 2018 21:48:13 +0000 (UTC) (envelope-from np@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w7OLmDin021273; Fri, 24 Aug 2018 21:48:13 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w7OLmDRo021272; Fri, 24 Aug 2018 21:48:13 GMT (envelope-from np@FreeBSD.org) Message-Id: <201808242148.w7OLmDRo021272@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Fri, 24 Aug 2018 21:48:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r338305 - head/sys/net X-SVN-Group: head X-SVN-Commit-Author: np X-SVN-Commit-Paths: head/sys/net X-SVN-Commit-Revision: 338305 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Aug 2018 21:48:14 -0000 Author: np Date: Fri Aug 24 21:48:13 2018 New Revision: 338305 URL: https://svnweb.freebsd.org/changeset/base/338305 Log: Unbreak VLANs after r337943. ether_set_pcp should not be called from ether_output_frame for VLAN interfaces -- the vid + pcp will be inserted during vlan_transmit in that case. r337943 sets the VLAN's ifnet's if_pcp to a proper PCP value and this led to double encapsulation (once with vid 0 and second time with vid+pcp). PR: 230794 Reviewed by: kib@ Approved by: re@ (gjb@) Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D16887 Modified: head/sys/net/if_ethersubr.c Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Fri Aug 24 21:08:05 2018 (r338304) +++ head/sys/net/if_ethersubr.c Fri Aug 24 21:48:13 2018 (r338305) @@ -461,7 +461,8 @@ ether_output_frame(struct ifnet *ifp, struct mbuf *m) uint8_t pcp; pcp = ifp->if_pcp; - if (pcp != IFNET_PCP_NONE && !ether_set_pcp(&m, ifp, pcp)) + if (pcp != IFNET_PCP_NONE && ifp->if_type != IFT_L2VLAN && + !ether_set_pcp(&m, ifp, pcp)) return (0); if (PFIL_HOOKED(&V_link_pfil_hook)) {