ok

Florian Obser(flor...@openbsd.org) on 2017.07.11 19:25:58 +0000:
> ... we want to log_warn what went wrong.
> OK?
> 
> diff --git if.c if.c
> index 4683bcffac9..c4a4fea1984 100644
> --- if.c
> +++ if.c
> @@ -111,7 +111,7 @@ if_nametosdl(char *name)
>  int
>  if_getmtu(char *name)
>  {
> -     int             s;
> +     int             s, save_errno;
>       struct ifreq    ifr;
>       u_long          mtu = 0;
>  
> @@ -123,7 +123,9 @@ if_getmtu(char *name)
>                       fatalx("strlcpy");
>               if (ioctl(s, SIOCGIFMTU, (char *)&ifr) >= 0)
>                       mtu = ifr.ifr_mtu;
> +             save_errno = errno;
>               close(s);
> +             errno = save_errno;
>       }
>  
>       return (mtu);
> 
> -- 
> I'm not entirely sure you are real.
> 

Reply via email to