zebra: Don't ignore setsockopt return

When attempting to limit the amount of data sent from the kernel
to FRR, some kernels we can run against may not have this ability
in which case the setsockopt will fail.  Notice that in the log.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2020-09-24 07:42:51 -04:00
parent ccda0eadac
commit 9781e6a047

View file

@ -1462,6 +1462,9 @@ void kernel_init(struct zebra_ns *zns)
one = 1;
ret = setsockopt(zns->netlink_dplane.sock, SOL_NETLINK, NETLINK_CAP_ACK,
&one, sizeof(one));
if (ret < 0)
zlog_notice(
"Registration for reduced ACK packet size failed, probably running an early kernel");
#endif
/* Register kernel socket. */