]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Enable WrongVif and WRWHOLEVIF callbacks.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 4 Aug 2016 15:09:30 +0000 (11:09 -0400)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Thu, 22 Dec 2016 01:26:05 +0000 (20:26 -0500)
Turn on Wrong Vif and Whole packet wrong vif callbacks.

Signed-off-by: Donald Sharp <sharpd@cumuusnetworks.com>
pimd/pim_mroute.c
pimd/pim_mroute.h

index aa2d021eed4633cb28c7fe3904aa07146446a785..31ca10b6b60224e2b65f195b1da9de1c3d8282f7 100644 (file)
@@ -56,6 +56,20 @@ static int pim_mroute_set(int fd, int enable)
     return -1;
   }
 
+  if (enable)
+    {
+      int upcalls = IGMPMSG_WRVIFWHOLE;
+      opt = MRT_PIM;
+    
+      err = setsockopt (fd, IPPROTO_IP, opt, &upcalls, sizeof (upcalls));
+      if (err)
+        {
+          zlog_warn ("Failure to register for VIFWHOLE and WRONGVIF upcalls %d %s",
+                    errno, safe_strerror (errno));
+          return -1;
+        }
+    }
+  
   return 0;
 }
 
index a09c6044868aa1f2590b6dd9fa95cae2d5a04560..4ae089f16bf3fe1a9415176e8fbd9d79d63209b9 100644 (file)
@@ -158,6 +158,10 @@ struct igmpmsg
 #endif
 #endif
 
+#ifndef IGMPMSG_WRVIFWHOLE
+#define IGMPMSG_WRVIFWHOLE      4
+#endif
+
 /*
   Above: from <linux/mroute.h>
 */