summaryrefslogtreecommitdiffstats
path: root/sys/net/if_clone.h
diff options
context:
space:
mode:
authorhrs <hrs@FreeBSD.org>2015-07-23 19:57:47 +0000
committerhrs <hrs@FreeBSD.org>2015-07-23 19:57:47 +0000
commit123cf5c769836859569e81e835ffd3506691c4b4 (patch)
tree1a14580f897ff42b69efb58a4aca6dd9f1e1b4ca /sys/net/if_clone.h
parent91dc3e4cd8d54579e0b117e02884dda45b6ef4d5 (diff)
downloadFreeBSD-src-123cf5c769836859569e81e835ffd3506691c4b4.zip
FreeBSD-src-123cf5c769836859569e81e835ffd3506691c4b4.tar.gz
MFC r279538:
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. Approved by: re (gjb)
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 7159421..6e20b29 100644
--- a/sys/net/if_clone.h
+++ b/sys/net/if_clone.h
@@ -68,6 +68,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