Date: Mon, 10 Sep 2007 00:28:06 GMT From: Marko Zec <zec@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 126248 for review Message-ID: <200709100028.l8A0S6ZJ002519@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126248 Change 126248 by zec@zec_tpx32 on 2007/09/10 00:28:01 When a vlan ifnet is assigned to a remote vnet, do not allow vlandev/vlantag to be either read or updated. In effect this makes a vlan ifnet assigned to a remote vnet (at least visually) indistinguishable from plain ethernet ifnets. Affected files ... .. //depot/projects/vimage/src/sys/net/if_vlan.c#5 edit Differences ... ==== //depot/projects/vimage/src/sys/net/if_vlan.c#5 (text+ko) ==== @@ -1379,6 +1379,12 @@ error = copyin(ifr->ifr_data, &vlr, sizeof(vlr)); if (error) break; +#ifdef VIMAGE + if (ifp->if_home_vnet != ifp->if_vnet) { + error = EPERM; + break; + } +#endif if (vlr.vlr_parent[0] == '\0') { vlan_unconfig(ifp); break; @@ -1406,6 +1412,12 @@ case SIOCGETVLAN: bzero(&vlr, sizeof(vlr)); +#ifdef VIMAGE + if (ifp->if_home_vnet != ifp->if_vnet) { + error = EPERM; + break; + } +#endif VLAN_LOCK(); if (TRUNK(ifv) != NULL) { strlcpy(vlr.vlr_parent, PARENT(ifv)->if_xname,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709100028.l8A0S6ZJ002519>