Turn on Wrong Vif and Whole packet wrong vif callbacks.
Signed-off-by: Donald Sharp <sharpd@cumuusnetworks.com>
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;
}
#endif
#endif
+#ifndef IGMPMSG_WRVIFWHOLE
+#define IGMPMSG_WRVIFWHOLE 4
+#endif
+
/*
Above: from <linux/mroute.h>
*/