summaryrefslogtreecommitdiffstats
path: root/sys/net/if_var.h
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-08-02 23:23:26 +0000
committerrwatson <rwatson@FreeBSD.org>2005-08-02 23:23:26 +0000
commit127682bc8cc0193fbd197a841ceae23e224bfe24 (patch)
treede46c75fd86fa260464df6aeac429ef828e5a646 /sys/net/if_var.h
parent20ffcc6ac18092994b3c1ac956137e70d47dfd85 (diff)
downloadFreeBSD-src-127682bc8cc0193fbd197a841ceae23e224bfe24.zip
FreeBSD-src-127682bc8cc0193fbd197a841ceae23e224bfe24.tar.gz
Protect link layer network interface multicast address list manipulation
using ifp->if_addr_mtx: - Initialize if_addr_mtx when ifnet is initialized. - Destroy if_addr_mtx when ifnet is torn down. - Rename ifmaof_ifpforaddr() to if_findmulti(); assert if_addr_mtx. Staticize. - Extract ifmultiaddr allocation and initialization into if_allocmulti(); accept a 'mflags' argument to indicate whether or not sleeping is permitted. This centralizes error handling and address duplication. - Extract ifmultiaddr tear-down and deallocation in if_freemulti(). - Re-structure if_addmulti() to hold if_addr_mtx around manipulation of the ifnet multicast address list and reference count manipulation. Make use of non-sleeping allocations. Annotate the fact that we only generate routing socket events for explicit address addition, not implicit link layer address addition. - Re-structure if_delmulti() to hold if_addr_mtx around manipulation of the ifnet multicast address list and reference count manipulation. Annotate the lack of a routing socket event for implicit link layer address removal. - De-spl all and sundry. Problem reported by: Ed Maste <emaste at phaedrus dot sandvine dot ca> MFC after: 1 week
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r--sys/net/if_var.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h
index 6c4991a..6b3c56c 100644
--- a/sys/net/if_var.h
+++ b/sys/net/if_var.h
@@ -645,7 +645,6 @@ struct ifaddr *ifa_ifwithnet(struct sockaddr *);
struct ifaddr *ifa_ifwithroute(int, struct sockaddr *, struct sockaddr *);
struct ifaddr *ifaof_ifpforaddr(struct sockaddr *, struct ifnet *);
-struct ifmultiaddr *ifmaof_ifpforaddr(struct sockaddr *, struct ifnet *);
int if_simloop(struct ifnet *ifp, struct mbuf *m, int af, int hlen);
typedef void *if_com_alloc_t(u_char type, struct ifnet *ifp);
OpenPOWER on IntegriCloud