summaryrefslogtreecommitdiffstats
path: root/sys/net/if_clone.h
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2015-03-02 20:00:03 +0000
committerhrs <hrs@FreeBSD.org>2015-03-02 20:00:03 +0000
commit1d300072872d740cd14d884408b4d0bdd6c63c5d (patch)
tree05d3b415604775b6412825773fe5cf4c187c313b /sys/net/if_clone.h
parentd07e2757d919ad93856db72cb57806ca09d4a3e2 (diff)
downloadFreeBSD-src-1d300072872d740cd14d884408b4d0bdd6c63c5d.zip
FreeBSD-src-1d300072872d740cd14d884408b4d0bdd6c63c5d.tar.gz
Fix group membership of cloned interfaces when one is moved by
if_vmove(). In if_vmove(), if_detach_internal() and if_attach_internal() were called in series to detach and reattach the interface. When detaching, if_delgroup() was called and the interface leaves all of the group membership. And then upon attachment, if_addgroup(ifp, IFG_ALL) was called and it joined only "all" group again. This had a problem. Normally, a cloned interface automatically joins a group whose name is ifc_name of the cloner in addition to "all" upon creation. However, if_vmove() removed the membership and did not restore upon attachment. Differential Revision: https://reviews.freebsd.org/D1859
Diffstat (limited to 'sys/net/if_clone.h')
-rw-r--r--sys/net/if_clone.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/net/if_clone.h b/sys/net/if_clone.h
index 67ec804..3a60b0a 100644
--- a/sys/net/if_clone.h
+++ b/sys/net/if_clone.h
@@ -69,6 +69,8 @@ void vnet_if_clone_init(void);
int if_clone_create(char *, size_t, caddr_t);
int if_clone_destroy(const char *);
int if_clone_list(struct if_clonereq *);
+struct if_clone *if_clone_findifc(struct ifnet *);
+void if_clone_addgroup(struct ifnet *, struct if_clone *);
/* The below interface used only by epair(4). */
int if_clone_destroyif(struct if_clone *, struct ifnet *);
OpenPOWER on IntegriCloud