From: Victor Julien Date: Sat, 2 Mar 2019 13:26:07 +0000 (+0100) Subject: af-packet: fix v3 code using v2 union member X-Git-Tag: suricata-4.0.7~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=61eb9c21ed215c6ba3f1d522800cedeac095d115;p=thirdparty%2Fsuricata.git af-packet: fix v3 code using v2 union member --- diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 59cb442b81..39a973e09d 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -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) {