ospfd: When failing to set socket options just note the failure

Instead of closing the socket, just note the failure and
continue on.  If we actually failed here so many other
things would not be working at all, that actually
closing the fd won't matter.

Signed-off-by: Donald Sharp <sharpd@nvidia.com>
This commit is contained in:
Donald Sharp 2020-10-11 12:56:02 -04:00
parent 147bb9ed61
commit 8ced966f39

View File

@ -201,7 +201,6 @@ int ospf_sock_init(struct ospf *ospf)
flog_err(EC_LIB_SOCKET,
"Can't set IP_HDRINCL option for fd %d: %s",
ospf_sock, safe_strerror(errno));
close(ospf_sock);
break;
}
#elif defined(IPTOS_PREC_INTERNETCONTROL)
@ -213,7 +212,6 @@ int ospf_sock_init(struct ospf *ospf)
flog_err(EC_LIB_SOCKET,
"can't set sockopt IP_TOS %d to socket %d: %s",
tos, ospf_sock, safe_strerror(errno));
close(ospf_sock); /* Prevent sd leak. */
break;
}
#else /* !IPTOS_PREC_INTERNETCONTROL */