Message ID | 20240731172332.683815-3-tom@herbertland.com (mailing list archive) |
---|---|
State | Changes Requested |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | flow_dissector: Dissect UDP encapsulation protocols | expand |
Tom Herbert wrote: > ETH_P_TEB (Trans Ether Bridging) is the EtherType to carry > a plain Etherent frame. Add case in skb_flow_dissect to parse > packets of this type > > Signed-off-by: Tom Herbert <tom@herbertland.com> Reviewed-by: Willem de Bruijn <willemb@google.com>
diff --git a/net/core/flow_dissector.c b/net/core/flow_dissector.c index e034e502ab49..d9abb4ae021b 100644 --- a/net/core/flow_dissector.c +++ b/net/core/flow_dissector.c @@ -1284,6 +1284,27 @@ bool __skb_flow_dissect(struct net *net, break; } + case htons(ETH_P_TEB): { + const struct ethhdr *eth; + struct ethhdr _eth; + + eth = __skb_header_pointer(skb, nhoff, sizeof(_eth), + data, hlen, &_eth); + if (!eth) + goto out_bad; + + proto = eth->h_proto; + nhoff += sizeof(*eth); + + /* Cap headers that we access via pointers at the + * end of the Ethernet header as our maximum alignment + * at that point is only 2 bytes. + */ + if (NET_IP_ALIGN) + hlen = nhoff; + + goto proto_again; + } case htons(ETH_P_8021AD): case htons(ETH_P_8021Q): { const struct vlan_hdr *vlan = NULL;
ETH_P_TEB (Trans Ether Bridging) is the EtherType to carry a plain Etherent frame. Add case in skb_flow_dissect to parse packets of this type Signed-off-by: Tom Herbert <tom@herbertland.com> --- net/core/flow_dissector.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+)