Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3f34b24a authored by Alexander Drozdov's avatar Alexander Drozdov Committed by David S. Miller
Browse files

af_packet: allow packets defragmentation not only for hash fanout type



Packets defragmentation was introduced for PACKET_FANOUT_HASH only,
see 7736d33f ("packet: Add pre-defragmentation support for ipv4
fanouts")

It may be useful to have defragmentation enabled regardless of
fanout type. Without that, the AF_PACKET user may have to:
1. Collect fragments from different rings
2. Defragment by itself

Signed-off-by: default avatarAlexander Drozdov <al.drozdov@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b9ebafbe
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -1349,14 +1349,14 @@ static int packet_rcv_fanout(struct sk_buff *skb, struct net_device *dev,
		return 0;
	}

	switch (f->type) {
	case PACKET_FANOUT_HASH:
	default:
	if (fanout_has_flag(f, PACKET_FANOUT_FLAG_DEFRAG)) {
		skb = ip_check_defrag(skb, IP_DEFRAG_AF_PACKET);
		if (!skb)
			return 0;
	}
	switch (f->type) {
	case PACKET_FANOUT_HASH:
	default:
		idx = fanout_demux_hash(f, skb, num);
		break;
	case PACKET_FANOUT_LB: