Commits

Leonard Herve authored and David Lamparter committed df4044b2cbe
Router Alert option for IGMP packets but not for PIM packets
No tags

pimd/pim_sock.c

Modified
104 104 }
105 105 #else
106 106 zlog_err("%s %s: Missing IP_PKTINFO and IP_RECVDSTADDR: unable to get dst addr from recvmsg()",
107 107 __FILE__, __PRETTY_FUNCTION__);
108 108 close(fd);
109 109 return PIM_SOCK_ERR_DSTADDR;
110 110 #endif
111 111 }
112 112
113 113
114 - /* Set router alert (RFC 2113) */
115 - {
114 + /* Set router alert (RFC 2113) for all IGMP messages (RFC 3376 4. Message Formats)*/
115 + if (protocol == IPPROTO_IGMP) {
116 116 char ra[4];
117 117 ra[0] = 148;
118 118 ra[1] = 4;
119 119 ra[2] = 0;
120 120 ra[3] = 0;
121 121 if (setsockopt(fd, IPPROTO_IP, IP_OPTIONS, ra, 4)) {
122 122 zlog_warn("Could not set Router Alert Option on socket fd=%d: errno=%d: %s",
123 123 fd, errno, safe_strerror(errno));
124 124 close(fd);
125 125 return PIM_SOCK_ERR_RA;

Everything looks good. We'll let you know here if there's anything you should know about.

Add shortcut