]> git.puffer.fish Git - mirror/frr.git/commitdiff
vrrpd: iterate over all ancillary messages 17034/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Mon, 7 Oct 2024 16:02:44 +0000 (13:02 -0300)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 8 Oct 2024 13:32:34 +0000 (13:32 +0000)
Assign the return of `CMSG_NXTHDR` so we can really iterate over the
ancillary data.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
(cherry picked from commit 5e1a3cd2ad1148f60f5a59474bcf3d176b9ab789)

vrrpd/vrrp_packet.c

index 36494c7df8b704ed536277ee281f0049aa2d3dcf..a2fb2bc321434c771665317834f841937e0bb5cb 100644 (file)
@@ -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;