-
Notifications
You must be signed in to change notification settings - Fork 7.3k
net/ethernet/ethernet.c: Handle ieee 802.1q (vlan) headers with id 0 (even if CONFIG_VLAN is not enabled) #83662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Please also note, that this will have to be adjusted: #if defined(CONFIG_NET_VLAN)
#define _NET_ETH_MAX_HDR_SIZE (sizeof(struct net_eth_vlan_hdr))
#else
#define _NET_ETH_MAX_HDR_SIZE (sizeof(struct net_eth_hdr))
#endif It assumes, that the drivers need not be able to receive vlan-tagged frames except, when |
I think this is a good assumption, after all if VLAN is not enabled the driver can just drop VLAN frames. |
This is a good point, the VLAN 0 should be passed to native interface. Would you be able to send a PR for it? |
Yes, I have prepared a PR. Please have a look. |
This assumption is no longer valid, if the proposal of this issue is implemented. See proposal in PR. |
Is your enhancement proposal related to a problem? Please describe.
Handle ieee 802.1q headers with vlan id 0 correctly, by forwarding them to the native default interface. This is as far as I could gather the intended use for the vlan-id 0. This is also required for some industrial protocols.
Describe the solution you'd like
Ethernet Frames tagged with id
0
should be stripped or in other words forwarded to the native interface, even if theCONFIG_VLAN
is not enabled.I am experimenting with something like:
Describe alternatives you've considered
None, as this is as far as I know the standardized behavior. If someone can confirm, this would be great.
The text was updated successfully, but these errors were encountered: