Skip to content

eigrpd: fix byte order in Hello authentication decode (backport #21545) - #21594

Merged
donaldsharp merged 1 commit into
stable/10.2from
mergify/bp/stable/10.2/pr-21545
Apr 17, 2026
Merged

eigrpd: fix byte order in Hello authentication decode (backport #21545)#21594
donaldsharp merged 1 commit into
stable/10.2from
mergify/bp/stable/10.2/pr-21545

Conversation

@mergify

@mergify mergify Bot commented Apr 17, 2026

Copy link
Copy Markdown

eigrp_hello_authentication_decode() compares md5->auth_type and md5->length directly against host-order constants, but these struct fields are stored in network byte order (the send path uses htons() at eigrp_packet.c:1248). On little-endian hosts the comparisons never match, so authentication is silently skipped.

Wrap both fields with ntohs() to match the encoding.

Signed-off-by: Tristan Madani tristan@live.fr


This is an automatic backport of pull request #21545 done by Mergify.

The auth_type and length fields in EIGRP Hello TLV structures are
network byte order, but several decode functions compare them against
host-order constants without ntohs().

Add ntohs() to all affected comparisons:
- eigrp_hello_authentication_decode: auth_type and length checks
- eigrp_hello_parameter_decode: length check
- eigrp_sw_version_decode: length check
- eigrp_peer_termination_decode: length check

Signed-off-by: Tristan Madani <tristan@live.fr>
(cherry picked from commit b8e6379)
@greptile-apps

greptile-apps Bot commented Apr 17, 2026

Copy link
Copy Markdown

Target branch is not in the allowed branches list.

@donaldsharp
donaldsharp merged commit 8f91143 into stable/10.2 Apr 17, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants