Skip to content

Commit

Permalink
net: ipv6: Fix lladdr state set to a wrong value
Browse files Browse the repository at this point in the history
The line below is wrong and useless:
	lladdr->state = ADDR_AUTOCONF;

Indeed the three possible values for the state attribute are:
ADDR_TENTATIVE, ADDR_PREFERRED or ADDR_DEPRECATED. ADDR_AUTOCONF
is one possible value for the type attribute.

Moreover uip_ds6_set_lladdr already set the type attribute to
ADDR_AUTOCONF (this done through the call to the function
uip_ds6_addr_add).

Therefore this issue has been simply fixed by removing the line.

Change-Id: I432b7bb6a6a858264bb634f2e4d253f55acbbd5b
Signed-off-by: Sebastien Griffoul <[email protected]>
  • Loading branch information
Sebastien Griffoul authored and jukkar committed May 26, 2016
1 parent d7e8fd0 commit 57cd993
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/ip/net_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1009,8 +1009,6 @@ int net_set_mac(uint8_t *mac, uint8_t len)
NET_DBG("Tentative link-local IPv6 address ");
PRINT6ADDR(&lladdr->ipaddr);
PRINTF("\n");

lladdr->state = ADDR_AUTOCONF;
}
#else
memcpy(&uip_lladdr, mac, len);
Expand Down

0 comments on commit 57cd993

Please sign in to comment.