From: Rafał Miłecki Date: Wed, 15 Feb 2017 10:37:57 +0000 (+0100) Subject: Set errno when refusing to send packet in interface_send_packet X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=0d545ed7287026584722a3f9aa855c29bd24d59f;p=oweals%2Fmdnsd.git Set errno when refusing to send packet in interface_send_packet Callers of interface_send_packet use perror and so expect errno to be set in case of fail. Signed-off-by: Rafał Miłecki --- diff --git a/interface.c b/interface.c index ada8acb..f9fe40a 100644 --- a/interface.c +++ b/interface.c @@ -125,6 +125,7 @@ interface_send_packet(struct interface *iface, struct sockaddr *to, struct iovec { if (!iface->multicast && !to) { fprintf(stderr, "No IP address specified for unicast interface\n"); + errno = EINVAL; return -1; }