[Olsr-dev] [PATCH v1 1/1] linux: olsr_if_isup: fix return code in error path
Ferry Huberts
(spam-protected)
Thu Oct 2 13:04:37 CEST 2014
Henning,
Could you take a look at this and ack it if you agree?
tnx
On 01/10/14 16:53, Ferry Huberts wrote:
> From: Ferry Huberts <(spam-protected)>
>
> Now it really returns false when an interface does not exist.
>
> Signed-off-by: Ferry Huberts <(spam-protected)>
> ---
> src/linux/net.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/linux/net.c b/src/linux/net.c
> index 650773f..00f45fa 100644
> --- a/src/linux/net.c
> +++ b/src/linux/net.c
> @@ -713,7 +713,7 @@ bool olsr_if_isup(const char * dev)
> if (ioctl(olsr_cnf->ioctl_s, SIOCGIFFLAGS, &ifr) < 0) {
> OLSR_PRINTF(1, "ioctl SIOCGIFFLAGS (get flags) error on device %s: %s (%d)\n",
> dev, strerror(errno), errno);
> - return 1;
> + return 0;
> }
> return (ifr.ifr_flags & IFF_UP) != 0;
> }
>
--
Ferry Huberts
More information about the Olsr-dev
mailing list