Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156434291
D40317.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D40317.diff
View Options
diff --git a/sys/netinet/ip_carp.h b/sys/netinet/ip_carp.h
--- a/sys/netinet/ip_carp.h
+++ b/sys/netinet/ip_carp.h
@@ -127,7 +127,7 @@
int carpr_vhid;
#define CARP_MAXVHID 255
int carpr_state;
-#define CARP_STATES "INIT", "BACKUP", "MASTER"
+#define CARP_STATES "INIT", "BACKUP", "MASTER", "SUPPRESS"
#define CARP_MAXSTATE 2
int carpr_advskew;
#define CARP_MAXSKEW 240
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
@@ -118,7 +118,7 @@
int sc_naddrs;
int sc_naddrs6;
int sc_ifasiz;
- enum { INIT = 0, BACKUP, MASTER } sc_state;
+ enum { INIT = 0, BACKUP, MASTER, SUPPRESS } sc_state;
int sc_suppress;
int sc_sendad_errors;
#define CARP_SENDAD_MAX_ERRORS 3
@@ -762,6 +762,7 @@
ch_tv.tv_usec = ch->carp_advskew * 1000000 / 256;
switch (sc->sc_state) {
+ case SUPPRESS:
case INIT:
break;
case MASTER:
@@ -1341,6 +1342,7 @@
carp_setrun(sc, 0);
carp_addroute(sc);
break;
+ case SUPPRESS:
case INIT:
case MASTER:
#ifdef INVARIANTS
@@ -1371,6 +1373,7 @@
return;
switch (sc->sc_state) {
+ case SUPPRESS:
case INIT:
carp_set_state(sc, BACKUP, "initialization complete");
carp_setrun(sc, 0);
@@ -1838,7 +1841,7 @@
bcopy(carpr->carpr_key, sc->sc_key, sizeof(sc->sc_key));
carp_hmac_prepare(sc);
}
- if (sc->sc_state != INIT &&
+ if (sc->sc_state != INIT && sc->sc_state != SUPPRESS &&
carpr->carpr_state != sc->sc_state) {
switch (carpr->carpr_state) {
case BACKUP:
@@ -2157,7 +2160,7 @@
#ifdef INET6
callout_stop(&sc->sc_md6_tmo);
#endif
- carp_set_state(sc, INIT, "hardware interface down");
+ carp_set_state(sc, SUPPRESS, "hardware interface down");
carp_setrun(sc, 0);
if (!sc->sc_suppress)
carp_demote_adj(V_carp_ifdown_adj, "interface down");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, May 14, 4:41 PM (6 h, 31 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33047167
Default Alt Text
D40317.diff (1 KB)
Attached To
Mode
D40317: carp: add a 'SUPPRESS' state
Attached
Detach File
Event Timeline
Log In to Comment