Page MenuHomeFreeBSD

D45037.id138231.diff
No OneTemporary

D45037.id138231.diff

diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c
--- a/sys/netinet/ip_carp.c
+++ b/sys/netinet/ip_carp.c
@@ -835,6 +835,7 @@
bool multicast = false;
NET_EPOCH_ASSERT();
+ MPASS(ch->carp_version == CARP_VERSION_CARP);
ifa = carp_find_ifa(m, af, ch->carp_vhid);
if (ifa == NULL) {
@@ -846,8 +847,7 @@
CARP_LOCK(sc);
/* verify the CARP version. */
- if (ch->carp_version != CARP_VERSION_CARP ||
- sc->sc_version != CARP_VERSION_CARP) {
+ if (sc->sc_version != CARP_VERSION_CARP) {
CARP_UNLOCK(sc);
CARPSTATS_INC(carps_badver);
@@ -956,6 +956,7 @@
struct carp_softc *sc;
NET_EPOCH_ASSERT();
+ MPASS(vh->vrrp_version == CARP_VERSION_VRRPv3);
ifa = carp_find_ifa(m, af, vh->vrrp_vrtid);
if (ifa == NULL) {
@@ -969,7 +970,7 @@
ifa_free(ifa);
/* verify the CARP version. */
- if (vh->vrrp_version != CARP_VERSION_VRRPv3 || sc->sc_version != CARP_VERSION_VRRPv3) {
+ if (sc->sc_version != CARP_VERSION_VRRPv3) {
CARP_UNLOCK(sc);
CARPSTATS_INC(carps_badver);

File Metadata

Mime Type
text/plain
Expires
Sun, Aug 16, 9:40 PM (4 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
36832313
Default Alt Text
D45037.id138231.diff (1016 B)

Event Timeline