On Tue, Apr 26, 2016 at 01:43:31PM +1000, David Gwynne wrote:
> the tftp proxy on the firewall is dying these days. i managed to
> track the failure down to an error sending the udp packet on.
> 
> rather than err, i think it more appropriate to warn and let the
> client retry in this situation.
> 
> ok?
> 
> Index: tftp-proxy.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/tftp-proxy/tftp-proxy.c,v
> retrieving revision 1.18
> diff -u -p -r1.18 tftp-proxy.c
> --- tftp-proxy.c      24 Feb 2016 16:34:47 -0000      1.18
> +++ tftp-proxy.c      26 Apr 2016 03:41:39 -0000
> @@ -869,7 +869,7 @@ unprivproc_pop(int fd, short events, voi
>               if (sendto(s, r->buf, r->buflen, 0,
>                   (struct sockaddr *)&r->addrs.dst,
>                   r->addrs.dst.ss_len) == -1)
> -                     lerr(1, "%s: unable to send", __func__);
> +                     lwarn("%s: unable to send", __func__);
>  
>               close(s);
>  
> 

Makes sense to me. UDP can bubble up many errors from the network stack so
it sure makes sense to not die on an error. OK claudio@

-- 
:wq Claudio

Reply via email to