Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Apr 2017 08:52:07 +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: r317586 - head/sys/net
Message-ID:  <201704290852.v3T8q7PL054387@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Sat Apr 29 08:52:07 2017
New Revision: 317586
URL: https://svnweb.freebsd.org/changeset/base/317586

Log:
  Make if_bridge complain if it can't disable some capabilities.
  
  MFC after:	2 weeks
  Sponsored by:	iXsystems, Inc.

Modified:
  head/sys/net/if_bridge.c

Modified: head/sys/net/if_bridge.c
==============================================================================
--- head/sys/net/if_bridge.c	Sat Apr 29 08:28:59 2017	(r317585)
+++ head/sys/net/if_bridge.c	Sat Apr 29 08:52:07 2017	(r317586)
@@ -940,8 +940,12 @@ bridge_set_ifcap(struct bridge_softc *sc
 		error = (*ifp->if_ioctl)(ifp, SIOCSIFCAP, (caddr_t)&ifr);
 		if (error)
 			if_printf(sc->sc_ifp,
-			    "error setting interface capabilities on %s\n",
-			    ifp->if_xname);
+			    "error setting capabilities on %s: %d\n",
+			    ifp->if_xname, error);
+		if ((ifp->if_capenable & ~set) != 0)
+			if_printf(sc->sc_ifp,
+			    "can't disable some capabilities on %s: 0x%x\n",
+			    ifp->if_xname, ifp->if_capenable & ~set);
 	}
 }
 



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