diff options
author | Eric Dumazet <edumazet@google.com> | 2020-09-25 15:38:08 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-26 02:04:55 +0200 |
commit | 89d01748b2354e210b5d4ea47bc25a42a1b42c82 (patch) | |
tree | 2d34a726c9e7d6b2c64c0c5859b61b418d45e6df /drivers/net/team/team.c | |
parent | bonding: set dev->needed_headroom in bond_setup_by_slave() (diff) | |
download | linux-89d01748b2354e210b5d4ea47bc25a42a1b42c82.tar.xz linux-89d01748b2354e210b5d4ea47bc25a42a1b42c82.zip |
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: 1d76efe1577b ("team: add support for non-ethernet devices")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/team/team.c')
-rw-r--r-- | drivers/net/team/team.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/team/team.c b/drivers/net/team/team.c index 8c1e02752ff6..69dfb1a49cc8 100644 --- a/drivers/net/team/team.c +++ b/drivers/net/team/team.c @@ -2112,6 +2112,7 @@ static void team_setup_by_port(struct net_device *dev, dev->header_ops = port_dev->header_ops; dev->type = port_dev->type; dev->hard_header_len = port_dev->hard_header_len; + dev->needed_headroom = port_dev->needed_headroom; dev->addr_len = port_dev->addr_len; dev->mtu = port_dev->mtu; memcpy(dev->broadcast, port_dev->broadcast, port_dev->addr_len); |