net: Ignore everything in RX if interface is not up
No need to receive anything if network interface is down. Change-Id: I22d62aeaf4fbef54608818bf6c8073ec2e9a7c09 Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This commit is contained in:
parent
318afc4519
commit
185f36034f
|
@ -716,6 +716,10 @@ int net_recv_data(struct net_if *iface, struct net_buf *buf)
|
|||
return -ENODATA;
|
||||
}
|
||||
|
||||
if (!atomic_test_bit(iface->flags, NET_IF_UP)) {
|
||||
return -ENETDOWN;
|
||||
}
|
||||
|
||||
NET_DBG("fifo %p iface %p buf %p len %zu", &rx_queue, iface, buf,
|
||||
net_buf_frags_len(buf));
|
||||
|
||||
|
|
Loading…
Reference in New Issue