]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: Don't ignore setsockopt return
authorDonald Sharp <sharpd@nvidia.com>
Thu, 24 Sep 2020 11:42:51 +0000 (07:42 -0400)
committerIgor Ryzhov <iryzhov@nfware.com>
Tue, 6 Oct 2020 12:54:25 +0000 (15:54 +0300)
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>
zebra/kernel_netlink.c

index ad0d4bf56bbba3ae5e31deb5b188bce158f1bbc2..c53d28a18ccf82720ece455773a5986dfadf20e9 100644 (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. */