Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 26 May 2017 22:22:49 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r318970 - head/sys/net
Message-ID:  <201705262222.v4QMMnLs049224@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Fri May 26 22:22:48 2017
New Revision: 318970
URL: https://svnweb.freebsd.org/changeset/base/318970

Log:
  Call VLAN_CAPABILITIES() when LAGG capabilities change.
  
  This makes VLAN on top of LAGG to expose proper capabilities if they are
  changed after creation.
  
  MFC after:	1 week

Modified:
  head/sys/net/if_lagg.c

Modified: head/sys/net/if_lagg.c
==============================================================================
--- head/sys/net/if_lagg.c	Fri May 26 22:17:44 2017	(r318969)
+++ head/sys/net/if_lagg.c	Fri May 26 22:22:48 2017	(r318970)
@@ -901,6 +901,7 @@ lagg_port_ioctl(struct ifnet *ifp, u_lon
 		LAGG_XLOCK(sc);
 		lagg_capabilities(sc);
 		LAGG_XUNLOCK(sc);
+		VLAN_CAPABILITIES(sc->sc_ifp);
 		break;
 
 	case SIOCSIFMTU:
@@ -1014,6 +1015,7 @@ lagg_port_ifdetach(void *arg __unused, s
 	lp->lp_detaching = 1;
 	lagg_port_destroy(lp, 1);
 	LAGG_XUNLOCK(sc);
+	VLAN_CAPABILITIES(sc->sc_ifp);
 }
 
 static void
@@ -1373,6 +1375,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
 		error = lagg_port_create(sc, tpif);
 		LAGG_XUNLOCK(sc);
 		if_rele(tpif);
+		VLAN_CAPABILITIES(ifp);
 		break;
 	case SIOCSLAGGDELPORT:
 		error = priv_check(td, PRIV_NET_LAGG);
@@ -1396,6 +1399,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
 		error = lagg_port_destroy(lp, 1);
 		LAGG_XUNLOCK(sc);
 		if_rele(tpif);
+		VLAN_CAPABILITIES(ifp);
 		break;
 	case SIOCSIFFLAGS:
 		/* Set flags on ports too */
@@ -1446,6 +1450,7 @@ lagg_ioctl(struct ifnet *ifp, u_long cmd
 		}
 		lagg_capabilities(sc);
 		LAGG_XUNLOCK(sc);
+		VLAN_CAPABILITIES(ifp);
 		error = 0;
 		break;
 



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