net/icmpv6/icmpv6_autoconfig.c: cmpv6_autoconfig() error handling must not overwrite overwrite the error code.
This commit is contained in:
parent
6c484847d5
commit
b4e7ca5aac
1 changed files with 5 additions and 3 deletions
|
@ -425,6 +425,8 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev)
|
|||
|
||||
if (ret < 0)
|
||||
{
|
||||
int senderr;
|
||||
|
||||
nerr("ERROR: Failed to get the router advertisement: %d (retries=%d)\n",
|
||||
ret, retries);
|
||||
|
||||
|
@ -432,10 +434,10 @@ int icmpv6_autoconfig(FAR struct net_driver_s *dev)
|
|||
* Advertisement message.
|
||||
*/
|
||||
|
||||
ret = icmpv6_send_message(dev, true);
|
||||
if (ret < 0)
|
||||
senderr = icmpv6_send_message(dev, true);
|
||||
if (senderr < 0)
|
||||
{
|
||||
nerr("ERROR: Failed send neighbor advertisement: %d\n", ret);
|
||||
nerr("ERROR: Failed send neighbor advertisement: %d\n", senderr);
|
||||
}
|
||||
|
||||
/* No off-link communications; No router address. */
|
||||
|
|
Loading…
Reference in a new issue