Skip to content

Commit

Permalink
vrrpd: iterate over all ancillary messages
Browse files Browse the repository at this point in the history
Assign the return of `CMSG_NXTHDR` so we can really iterate over the
ancillary data.

Signed-off-by: Rafael Zalamena <[email protected]>
(cherry picked from commit 5e1a3cd)
  • Loading branch information
rzalamena authored and mergify[bot] committed Oct 8, 2024
1 parent a425b3c commit 5972018
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vrrpd/vrrp_packet.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ ssize_t vrrp_pkt_parse_datagram(int family, int version, bool ipv4_ph,
} else if (family == AF_INET6) {
struct cmsghdr *c;

for (c = CMSG_FIRSTHDR(m); c != NULL; CMSG_NXTHDR(m, c)) {
for (c = CMSG_FIRSTHDR(m); c != NULL; c = CMSG_NXTHDR(m, c)) {
if (c->cmsg_level == IPPROTO_IPV6
&& c->cmsg_type == IPV6_HOPLIMIT)
break;
Expand Down

0 comments on commit 5972018

Please sign in to comment.