[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] lwip: Fix bug: Error handling on configure_device()
From: |
Joan Lledó |
Subject: |
[PATCH] lwip: Fix bug: Error handling on configure_device() |
Date: |
Sat, 11 May 2019 11:32:02 +0200 |
* lwip/lwip-util.c:
* EINVAL was never being returned.
* Return error code for tcpip_callback() as errno.
---
lwip/lwip-util.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/lwip/lwip-util.c b/lwip/lwip-util.c
index 4f632185..61f3194a 100644
--- a/lwip/lwip-util.c
+++ b/lwip/lwip-util.c
@@ -253,7 +253,7 @@ static void
update_if (void *arg)
{
int i;
- struct update_if_args *args = (struct update_if_args *) arg;
+ struct update_if_args *args = arg;
netif_set_addr (args->netif, (ip4_addr_t *) & args->addr,
(ip4_addr_t *) & args->netmask,
@@ -356,10 +356,8 @@ configure_device (struct netif *netif, uint32_t addr,
uint32_t netmask,
arg->gateway = gateway;
arg->addr6 = addr6;
arg->addr6_prefix_len = addr6_prefix_len;
- err = tcpip_callback (update_if, arg);
- if (err)
- return err;
+ err = err_to_errno(tcpip_callback (update_if, arg));
}
- return errno;
+ return err;
}
--
2.17.1
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), (continued)
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Samuel Thibault, 2019/05/02
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Joan Lledó, 2019/05/03
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Samuel Thibault, 2019/05/03
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Joan Lledó, 2019/05/11
- [PATCH 1/2] lwip: Fix bug: Error handling on configure_device(), Joan Lledó, 2019/05/11
- Re: [PATCH 1/2] lwip: Fix bug: Error handling on configure_device(), Samuel Thibault, 2019/05/11
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Samuel Thibault, 2019/05/11
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Joan Lledó, 2019/05/11
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Samuel Thibault, 2019/05/11
- Re: [PATCH 3/4] lwip: Error handling when calling update_if(), Joan Lledó, 2019/05/11
- [PATCH] lwip: Fix bug: Error handling on configure_device(),
Joan Lledó <=
- Re: [PATCH] lwip: Fix bug: Error handling on configure_device(), Samuel Thibault, 2019/05/11