aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorAlexander Drozdov <al.drozdov@gmail.com>2015-02-20 00:24:27 -0500
committerDavid S. Miller <davem@davemloft.net>2015-02-21 23:00:18 -0500
commit3f34b24a732bab9635c4b32823268c37c01b40f0 (patch)
treee7e5e79fe8fb4446d7191b745e853ec95444c72b /net
parentb9ebafbe8cfeeddec881504c446cccd0d87a51b6 (diff)
af_packet: allow packets defragmentation not only for hash fanout type
Packets defragmentation was introduced for PACKET_FANOUT_HASH only, see 7736d33f4262 ("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: Alexander Drozdov <al.drozdov@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/packet/af_packet.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c
index 9c28cec1a083..99fc628f7372 100644
--- a/net/packet/af_packet.c
+++ b/net/packet/af_packet.c
@@ -1349,14 +1349,14 @@ static int packet_rcv_fanout(struct sk_buff *skb, struct net_device *dev,
1349 return 0; 1349 return 0;
1350 } 1350 }
1351 1351
1352 if (fanout_has_flag(f, PACKET_FANOUT_FLAG_DEFRAG)) {
1353 skb = ip_check_defrag(skb, IP_DEFRAG_AF_PACKET);
1354 if (!skb)
1355 return 0;
1356 }
1352 switch (f->type) { 1357 switch (f->type) {
1353 case PACKET_FANOUT_HASH: 1358 case PACKET_FANOUT_HASH:
1354 default: 1359 default:
1355 if (fanout_has_flag(f, PACKET_FANOUT_FLAG_DEFRAG)) {
1356 skb = ip_check_defrag(skb, IP_DEFRAG_AF_PACKET);
1357 if (!skb)
1358 return 0;
1359 }
1360 idx = fanout_demux_hash(f, skb, num); 1360 idx = fanout_demux_hash(f, skb, num);
1361 break; 1361 break;
1362 case PACKET_FANOUT_LB: 1362 case PACKET_FANOUT_LB: