mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
carp: define CARP_AUTHLEN for carp_authlen field
Replace the bare 7 with a named constant.
This commit is contained in:
1 parent
9a4a9f623b
commit
d9e7dd4a19
2 files changed
+7
-1
No files matched your search
@@ -1216,7 +1216,7 @@ carp_send_ad_locked(struct carp_softc *sc)
|
||||
ch.carp_vhid = sc->sc_vhid;
|
||||
ch.carp_advbase = sc->sc_advbase;
|
||||
ch.carp_advskew = advskew;
|
||||
ch.carp_authlen = 7; /* XXX DEFINE */
|
||||
ch.carp_authlen = CARP_AUTHLEN;
|
||||
ch.carp_pad1 = 0; /* must be zero */
|
||||
ch.carp_cksum = 0;
|
||||
|
||||
|
||||
@@ -80,6 +80,12 @@ struct carp_header {
|
||||
|
||||
CTASSERT(sizeof(struct carp_header) == 36);
|
||||
|
||||
/*
|
||||
* CARP authentication length in 32-bit chunks:
|
||||
* counter[2] (8 bytes) + SHA1 HMAC (20 bytes) = 28 bytes = 7 chunks.
|
||||
*/
|
||||
#define CARP_AUTHLEN 7
|
||||
|
||||
/*
|
||||
* The VRRPv3 header layout is as follows:
|
||||
* See RFC9568, 5.1. VRRP Packet Format
|
||||
|
||||
Reference in new issue
Block a user