Page MenuHomeFreeBSD

carp: isolate VRRP from CARP
ClosedPublic

Authored by kp on Wed, May 1, 9:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 10:22 PM
Unknown Object (File)
Sat, May 4, 6:19 PM
Unknown Object (File)
Wed, May 1, 11:55 PM
Unknown Object (File)
Wed, May 1, 11:25 PM
Unknown Object (File)
Wed, May 1, 10:32 PM

Details

Reviewers
None
Group Reviewers
network
pfsense
Commits
rGa254d6870e88: carp: isolate VRRP from CARP
Summary

There is only one functional change here - we don't allow SIOCSVH (or
netlink request) to change sc->sc_version. I'm convinced that allowing
such a change doesn't brings any practical value, but creates enless
minefields in front of both developers and end users (sysadmins). If
you want to switch from VRRP to CARP or vice versa, you'd need to recreate
the VHID.

Oh, one tiny funtional change: carp_ioctl_set() won't modify any fields
if it returns EINVAL. Previously you could provide valid advbase with
invalid advskew - that used to modify advbase and return EINVAL.

All other changes is a sweep around not ever using CARP fields when
we are in VRRP mode and vice versa. Also adding assertions on sc_version
where necessary.

Do not send VRRP vars in CARP mode via NetLink and vice versa. However
in compat ioctl SIOCGVH for VRRP mode the CARP fields would be zeroes.

This allows to declare softc as union and thus prevent any future logic
deterioration wrt to mixing VRRP and CARP.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kp requested review of this revision.Wed, May 1, 9:43 AM

Is this whole stack of reviews a temporary reviews to get easier review for pfsense and network? I think better just squash all my submissions on top of your work and push that to FreeBSD/main as one change.

Is this whole stack of reviews a temporary reviews to get easier review for pfsense and network? I think better just squash all my submissions on top of your work and push that to FreeBSD/main as one change.

My plan was to push the separate commits, because they detail the individual elements of the improvements and their justifications.

In D45039#1027550, @kp wrote:

Is this whole stack of reviews a temporary reviews to get easier review for pfsense and network? I think better just squash all my submissions on top of your work and push that to FreeBSD/main as one change.

My plan was to push the separate commits, because they detail the individual elements of the improvements and their justifications.

Up to you. I'm totally fine if you squash them on top of yours and claim everything under your name.

This revision was not accepted when it landed; it landed in state Needs Review.Wed, May 8, 11:21 AM
Closed by commit rGa254d6870e88: carp: isolate VRRP from CARP (authored by glebius, committed by kp). · Explain Why
This revision was automatically updated to reflect the committed changes.