diff options
author | bms <bms@FreeBSD.org> | 2006-09-25 11:53:54 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2006-09-25 11:53:54 +0000 |
commit | e5ef61bea6480fa8426fd885476b22bfde210fa0 (patch) | |
tree | 4be50c73afba0173cb1c5e8832ba3d194810a90a | |
parent | 8c9fe8b42172bb32e4fc57e7e2aefec5fb88ff96 (diff) | |
download | FreeBSD-src-e5ef61bea6480fa8426fd885476b22bfde210fa0.zip FreeBSD-src-e5ef61bea6480fa8426fd885476b22bfde210fa0.tar.gz |
Fix an incompatibility between CARP and IPv4 multicast routing, whereby
the VRRPv2 advertisements will originate from the wrong source address.
This only affects kernels compiled with MROUTING and after the MRT_INIT
ioctl() has been issued.
Set imo_multicast_vif in carp's softc to the invalid value -1 after it is
zeroed by softc allocation, to stop the ip_output() path looking up the
incorrect source address thinking a vif is set.
PR: kern/100532
Submitted by: Bohus Plucinsky
MFC after: 1 week
-rw-r--r-- | sys/netinet/ip_carp.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 48c85e0..5e35a8d 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -379,6 +379,7 @@ carp_clone_create(struct if_clone *ifc, int unit, caddr_t params) (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, M_WAITOK); sc->sc_imo.imo_max_memberships = IP_MIN_MEMBERSHIPS; + sc->sc_imo.imo_multicast_vif = -1; callout_init(&sc->sc_ad_tmo, NET_CALLOUT_MPSAFE); callout_init(&sc->sc_md_tmo, NET_CALLOUT_MPSAFE); |