]> git.puffer.fish Git - matthieu/frr.git/commitdiff
ripd: failure to create a socket shouldn't be a fatal error
authorRenato Westphal <renato@opensourcerouting.org>
Fri, 4 Jan 2019 21:08:10 +0000 (19:08 -0200)
committerRenato Westphal <renato@opensourcerouting.org>
Fri, 18 Jan 2019 18:15:41 +0000 (16:15 -0200)
The ripd code can handle this error just fine (e.g. reject the
configuration transaction), there's no need to exit when a socket
fails to be created.

Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
ripd/ripd.c

index 916fba2269a4a9a132395c2d6e1cc62a85c286b9..c6abfb557d708de98048e10c6ff7cb6cbf8e8a46 100644 (file)
@@ -1347,7 +1347,7 @@ int rip_create_socket(void)
        if (sock < 0) {
                flog_err_sys(EC_LIB_SOCKET, "Cannot create UDP socket: %s",
                             safe_strerror(errno));
-               exit(1);
+               return -1;
        }
 
        sockopt_broadcast(sock);