mirror of
https://github.com/torvalds/linux.git
synced 2026-09-25 21:21:09 -04:00
macvlan: implement .parse_protocol hook function in macvlan_hard_header_ops
The .parse_protocol hook function in the macvlan_header_ops structure is not implemented. As a result, when the AF_PACKET family is used to send packets, skb->protocol will be set to 0. Macvlan is a device of type ARPHRD_ETHER (ether_setup). Therefore, use eth_header_parse_protocol function to obtain the protocol. Suggested-by: Eric Dumazet <[email protected]> Signed-off-by: Zhengchao Shao <[email protected]> Reviewed-by: Willem de Bruijn <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Paolo Abeni <[email protected]>
This commit is contained in:
committed by
Paolo Abeni
parent
76ca216765
commit
cb297cc5e1
@@ -609,6 +609,7 @@ static const struct header_ops macvlan_hard_header_ops = {
|
||||
.parse = eth_header_parse,
|
||||
.cache = eth_header_cache,
|
||||
.cache_update = eth_header_cache_update,
|
||||
.parse_protocol = eth_header_parse_protocol,
|
||||
};
|
||||
|
||||
static int macvlan_open(struct net_device *dev)
|
||||
|
||||
Reference in New Issue
Block a user