net: if: Fix triggering interface link call back

Do not call callback if destination ll address is not set. This
happens when dst is multicast or broadcast.

Change-Id: I34dda92799a987d9cff031dc97f4a01b94437561
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
This commit is contained in:
Ravi kumar Veeramally 2017-03-24 12:47:11 +02:00 committed by Jukka Rissanen
commit 29fb336ccd

View file

@ -120,7 +120,9 @@ static bool net_if_tx(struct net_if *iface)
net_context_send_cb(context, context_token, status);
}
net_if_call_link_cb(iface, dst, status);
if (dst->addr) {
net_if_call_link_cb(iface, dst, status);
}
return true;
}
@ -282,7 +284,7 @@ done:
net_context_send_cb(context, token, status);
}
if (verdict == NET_DROP) {
if (verdict == NET_DROP && dst->addr) {
net_if_call_link_cb(iface, dst, status);
}