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>
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)
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 */