Skip to content

Commit 72f6510

Browse files
vyasevichdavem330
authored andcommitted
Revert "drivers/net, ipv6: Select IPv6 fragment idents for virtio UFO packets"
This reverts commit 5188cd4. Now that GSO layer can track if fragment id has been selected and can allocate one if necessary, we don't need to do this in tap and macvtap. This reverts most of the code and only keeps the new ipv6 fragment id generation function that is still needed. Fixes: 3d0ad09 (drivers/net: Disable UFO through virtio) Signed-off-by: Vladislav Yasevich <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 0508c07 commit 72f6510

File tree

2 files changed

+1
-8
lines changed

2 files changed

+1
-8
lines changed

drivers/net/macvtap.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
#include <linux/fs.h>
1818
#include <linux/uio.h>
1919

20-
#include <net/ipv6.h>
2120
#include <net/net_namespace.h>
2221
#include <net/rtnetlink.h>
2322
#include <net/sock.h>
@@ -589,8 +588,6 @@ static int macvtap_skb_from_vnet_hdr(struct macvtap_queue *q,
589588
pr_warn_once("macvtap: %s: using disabled UFO feature; please fix this program\n",
590589
current->comm);
591590
gso_type = SKB_GSO_UDP;
592-
if (skb->protocol == htons(ETH_P_IPV6))
593-
ipv6_proxy_select_ident(skb);
594591
break;
595592
default:
596593
return -EINVAL;

drivers/net/tun.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
#include <linux/nsproxy.h>
6666
#include <linux/virtio_net.h>
6767
#include <linux/rcupdate.h>
68-
#include <net/ipv6.h>
6968
#include <net/net_namespace.h>
7069
#include <net/netns/generic.h>
7170
#include <net/rtnetlink.h>
@@ -1167,8 +1166,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
11671166
break;
11681167
}
11691168

1170-
skb_reset_network_header(skb);
1171-
11721169
if (gso.gso_type != VIRTIO_NET_HDR_GSO_NONE) {
11731170
pr_debug("GSO!\n");
11741171
switch (gso.gso_type & ~VIRTIO_NET_HDR_GSO_ECN) {
@@ -1189,8 +1186,6 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
11891186
current->comm);
11901187
}
11911188
skb_shinfo(skb)->gso_type = SKB_GSO_UDP;
1192-
if (skb->protocol == htons(ETH_P_IPV6))
1193-
ipv6_proxy_select_ident(skb);
11941189
break;
11951190
}
11961191
default:
@@ -1221,6 +1216,7 @@ static ssize_t tun_get_user(struct tun_struct *tun, struct tun_file *tfile,
12211216
skb_shinfo(skb)->tx_flags |= SKBTX_SHARED_FRAG;
12221217
}
12231218

1219+
skb_reset_network_header(skb);
12241220
skb_probe_transport_header(skb, 0);
12251221

12261222
rxhash = skb_get_hash(skb);

0 commit comments

Comments
 (0)