net: route: remove extra variable use in net_route_add()
Let's drop the lladdr variable and get the link address and length from the net_linkaddr_storage variable instead. Change-Id: I75a5d08527cda7df102db897ade9015d39f10caf Signed-off-by: Michael Scott <michael.scott@linaro.org>
This commit is contained in:
parent
f3c66e5205
commit
c78c7ac13c
1 changed files with 1 additions and 5 deletions
|
@ -306,7 +306,6 @@ struct net_route_entry *net_route_add(struct net_if *iface,
|
|||
struct net_nbr *nbr, *nbr_nexthop, *tmp;
|
||||
struct net_route_nexthop *nexthop_route;
|
||||
struct net_route_entry *route;
|
||||
struct net_linkaddr lladdr;
|
||||
|
||||
NET_ASSERT(addr);
|
||||
NET_ASSERT(iface);
|
||||
|
@ -328,11 +327,8 @@ struct net_route_entry *net_route_add(struct net_if *iface,
|
|||
|
||||
NET_ASSERT(nexthop_lladdr);
|
||||
|
||||
lladdr.addr = nexthop_lladdr->addr;
|
||||
lladdr.len = nexthop_lladdr->len;
|
||||
|
||||
NET_DBG("Nexthop %s lladdr is %s", net_sprint_ipv6_addr(nexthop),
|
||||
net_sprint_ll_addr(lladdr.addr, lladdr.len));
|
||||
net_sprint_ll_addr(nexthop_lladdr->addr, nexthop_lladdr->len));
|
||||
|
||||
route = net_route_lookup(iface, addr);
|
||||
if (route) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue