zebra: SO_BROADCAST needs a uint32_t instead of a uint8_t

Using SO_BROADCAST, in the linux kernel, requires a uint32_t to be passed
in for all SOL_SOCKET calls.  Modify code to use it.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2020-02-17 19:24:16 -05:00
parent dea8e5f275
commit 08fa52a826

View File

@ -319,9 +319,10 @@ void send_packet(struct interface *ifp, struct stream *s, uint32_t dst,
if (dst == INADDR_BROADCAST) {
on = 1;
if (setsockopt(irdp_sock, SOL_SOCKET, SO_BROADCAST, (char *)&on,
sizeof(on))
uint32_t bon = 1;
if (setsockopt(irdp_sock, SOL_SOCKET, SO_BROADCAST, &bon,
sizeof(bon))
< 0)
zlog_debug("sendto %s", safe_strerror(errno));
}