]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
af-packet: fix v3 code using v2 union member
authorVictor Julien <victor@inliniac.net>
Sat, 2 Mar 2019 13:26:07 +0000 (14:26 +0100)
committerVictor Julien <victor@inliniac.net>
Wed, 6 Mar 2019 06:25:05 +0000 (07:25 +0100)
src/source-af-packet.c

index 59cb442b81cd19b5eb66bfee54fee77427f8012c..39a973e09dbaae2c7872a7d8a61d36fbd7219208 100644 (file)
@@ -1704,7 +1704,7 @@ static int AFPComputeRingParamsV3(AFPThreadVars *ptv)
         }
     }
 
-    ptv->req.tp_frame_size = TPACKET_ALIGN(snaplen +TPACKET_ALIGN(TPACKET_ALIGN(tp_hdrlen) + sizeof(struct sockaddr_ll) + ETH_HLEN) - ETH_HLEN);
+    ptv->req3.tp_frame_size = TPACKET_ALIGN(snaplen +TPACKET_ALIGN(TPACKET_ALIGN(tp_hdrlen) + sizeof(struct sockaddr_ll) + ETH_HLEN) - ETH_HLEN);
     frames_per_block = ptv->req3.tp_block_size / ptv->req3.tp_frame_size;
 
     if (frames_per_block == 0) {