Commit 89d01748 authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller

team: set dev->needed_headroom in team_setup_by_port()

Some devices set needed_headroom. If we ignore it, we might
end up crashing in various skb_push() for example in ipgre_header()
since some layers assume enough headroom has been reserved.

Fixes: 1d76efe1 ("team: add support for non-ethernet devices")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f32f1933
...@@ -2112,6 +2112,7 @@ static void team_setup_by_port(struct net_device *dev, ...@@ -2112,6 +2112,7 @@ static void team_setup_by_port(struct net_device *dev,
dev->header_ops = port_dev->header_ops; dev->header_ops = port_dev->header_ops;
dev->type = port_dev->type; dev->type = port_dev->type;
dev->hard_header_len = port_dev->hard_header_len; dev->hard_header_len = port_dev->hard_header_len;
dev->needed_headroom = port_dev->needed_headroom;
dev->addr_len = port_dev->addr_len; dev->addr_len = port_dev->addr_len;
dev->mtu = port_dev->mtu; dev->mtu = port_dev->mtu;
memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len); memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment