]> git.puffer.fish Git - mirror/frr.git/commitdiff
pim6d: mroute stuck in register state, multicast traffic getting drops 11857/head
authorMobashshera Rasool <mrasool@vmware.com>
Tue, 23 Aug 2022 07:09:20 +0000 (00:09 -0700)
committerMobashshera Rasool <mrasool@vmware.com>
Tue, 23 Aug 2022 07:09:20 +0000 (00:09 -0700)
IPv4 and IPv6 behaves a little bit differently with the socket
options.
IPPROTO_RAW socket option is only for IPv4.
Therefore the register packet was not properly getting encapculated
for PIMv6 and was working fine for PIMv4.

So have used IPPROTO_PIM for PIMv6.

Fixes: #11846
Signed-off-by: Mobashshera Rasool <mrasool@vmware.com>
pimd/pim_addr.h
pimd/pim_sock.c

index defe4070cfb54697d8c3bb839f0da27118ca9370..7852d1788a7758a7c9edc76868361ce6d42c76cf 100644 (file)
@@ -31,6 +31,7 @@ typedef struct in_addr pim_addr;
 #define PIM_ADDRSTRLEN INET_ADDRSTRLEN
 #define PIM_AF         AF_INET
 #define PIM_AFI                AFI_IP
+#define PIM_PROTO_REG   IPPROTO_RAW
 #define PIM_IPADDR     IPADDR_V4
 #define ipaddr_pim     ipaddr_v4
 #define PIM_MAX_BITLEN IPV4_MAX_BITLEN
@@ -58,6 +59,7 @@ typedef struct in6_addr pim_addr;
 #define PIM_ADDRSTRLEN INET6_ADDRSTRLEN
 #define PIM_AF         AF_INET6
 #define PIM_AFI                AFI_IP6
+#define PIM_PROTO_REG   IPPROTO_PIM
 #define PIM_IPADDR     IPADDR_V6
 #define ipaddr_pim     ipaddr_v6
 #define PIM_MAX_BITLEN IPV6_MAX_BITLEN
index b5a055c6aa94a7f4e620ffbdf76abb1f638408ed..4b91bf07d9a78745a0c49e52cc7e8bbf281b8b4c 100644 (file)
@@ -185,7 +185,7 @@ int pim_reg_sock(void)
        long flags;
 
        frr_with_privs (&pimd_privs) {
-               fd = socket(PIM_AF, SOCK_RAW, IPPROTO_RAW);
+               fd = socket(PIM_AF, SOCK_RAW, PIM_PROTO_REG);
        }
 
        if (fd < 0) {