File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -1095,12 +1095,13 @@ static netdev_tx_t sit_tunnel_xmit(struct sk_buff *skb,
1095
1095
1096
1096
static void ipip6_tunnel_bind_dev (struct net_device * dev )
1097
1097
{
1098
+ struct ip_tunnel * tunnel = netdev_priv (dev );
1099
+ int t_hlen = tunnel -> hlen + sizeof (struct iphdr );
1098
1100
struct net_device * tdev = NULL ;
1099
- struct ip_tunnel * tunnel ;
1101
+ int hlen = LL_MAX_HEADER ;
1100
1102
const struct iphdr * iph ;
1101
1103
struct flowi4 fl4 ;
1102
1104
1103
- tunnel = netdev_priv (dev );
1104
1105
iph = & tunnel -> parms .iph ;
1105
1106
1106
1107
if (iph -> daddr ) {
@@ -1123,14 +1124,15 @@ static void ipip6_tunnel_bind_dev(struct net_device *dev)
1123
1124
tdev = __dev_get_by_index (tunnel -> net , tunnel -> parms .link );
1124
1125
1125
1126
if (tdev && !netif_is_l3_master (tdev )) {
1126
- int t_hlen = tunnel -> hlen + sizeof (struct iphdr );
1127
1127
int mtu ;
1128
1128
1129
1129
mtu = tdev -> mtu - t_hlen ;
1130
1130
if (mtu < IPV6_MIN_MTU )
1131
1131
mtu = IPV6_MIN_MTU ;
1132
1132
WRITE_ONCE (dev -> mtu , mtu );
1133
+ hlen = tdev -> hard_header_len + tdev -> needed_headroom ;
1133
1134
}
1135
+ dev -> needed_headroom = t_hlen + hlen ;
1134
1136
}
1135
1137
1136
1138
static void ipip6_tunnel_update (struct ip_tunnel * t , struct ip_tunnel_parm * p ,
You can’t perform that action at this time.
0 commit comments