HomeFreeBSD

MFC 310847 310864

Description

MFC 310847 310864

Harden CARP against network loops.

If there is a loop in the network a CARP that is in MASTER state will see it's
own broadcasts, which will then cause it to assume BACKUP state. When it
assumes BACKUP it will stop sending advertisements. In that state it will no
longer see advertisements and will assume MASTER...

We can't catch all the cases where we are seeing our own CARP broadcast, but
we can catch the obvious case.

Unbreak ip_carp with WITHOUT_INET6 enabled by conditionalizing all IPv6
structs under the INET6 #ifdef. Similarly (even though it doesn't seem
to affect the build), conditionalize all IPv4 structs under the INET
#ifdef

This also unbreaks the LINT-NOINET6 tinderbox target on amd64; I have not
verified other MACHINE/TARGET pairs (e.g. armv6/arm).

Submitted by: torek
Obtained from: FreeNAS
Pointyhat fix: ngie

Details

Provenance
jpaetzelAuthored on
Parents
rS312439: MFC 310847 310864
Branches
Unknown
Tags
Unknown