net: ethernet: Add Kconfig option to forward unrecognized EtherType frames
Add Kconfig option to the Ethernet L2 which allows to forward frames with unknown EtherType further into the stack. This can be useful for packet sockets, where further frame processing is application dependent. Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
This commit is contained in:
parent
eddb6c8111
commit
0516d75d84
2 changed files with 13 additions and 0 deletions
|
@ -254,6 +254,11 @@ static enum net_verdict ethernet_recv(struct net_if *iface,
|
|||
goto drop;
|
||||
#endif
|
||||
default:
|
||||
if (IS_ENABLED(CONFIG_NET_ETHERNET_FORWARD_UNRECOGNISED_ETHERTYPE)) {
|
||||
family = AF_UNSPEC;
|
||||
break;
|
||||
}
|
||||
|
||||
NET_DBG("Unknown hdr type 0x%04x iface %p", type, iface);
|
||||
goto drop;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue