diff options
author | mlaier <mlaier@FreeBSD.org> | 2006-07-08 00:01:01 +0000 |
---|---|---|
committer | mlaier <mlaier@FreeBSD.org> | 2006-07-08 00:01:01 +0000 |
commit | f7e47bf3740e1a9ed87106d518eafb689d1478b8 (patch) | |
tree | 5ab1a26547a4af85080e4f829286fde9f76075c5 /sys/contrib | |
parent | cf1af765652056615e9133119e2c8c051fe90f27 (diff) | |
download | FreeBSD-src-f7e47bf3740e1a9ed87106d518eafb689d1478b8.zip FreeBSD-src-f7e47bf3740e1a9ed87106d518eafb689d1478b8.tar.gz |
Make in-kernel multicast protocols for pfsync and carp work after enabling
dynamic resizing of multicast membership array.
Reported and testing by: Maxim Konovalov, Scott Ullrich
Reminded by: thompsa
MFC after: 2 weeks
Diffstat (limited to 'sys/contrib')
-rw-r--r-- | sys/contrib/pf/net/if_pfsync.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/contrib/pf/net/if_pfsync.c b/sys/contrib/pf/net/if_pfsync.c index 8568b27..1c0c6c3 100644 --- a/sys/contrib/pf/net/if_pfsync.c +++ b/sys/contrib/pf/net/if_pfsync.c @@ -200,6 +200,7 @@ pfsync_clone_destroy(struct ifnet *ifp) if_detach(ifp); if_free(ifp); LIST_REMOVE(sc, sc_next); + free(sc->sc_imo.imo_membership, M_PFSYNC); free(sc, M_PFSYNC); } @@ -227,6 +228,10 @@ pfsync_clone_create(struct if_clone *ifc, int unit) sc->sc_sendaddr.s_addr = htonl(INADDR_PFSYNC_GROUP); sc->sc_ureq_received = 0; sc->sc_ureq_sent = 0; + sc->sc_imo.imo_membership = (struct in_multi **)malloc( + (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_PFSYNC, + M_WAITOK); + sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; ifp = SCP2IFP(sc); if_initname(ifp, ifc->ifc_name, unit); |