]> git.droids-corp.org - dpdk.git/commitdiff
pdump: fix packet snapshot length initialization
authorStephen Hemminger <stephen@networkplumber.org>
Wed, 27 Oct 2021 18:08:47 +0000 (11:08 -0700)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 31 Oct 2021 23:36:29 +0000 (00:36 +0100)
If packet dump was enabled via pdump_enable_by_deviceid
the packet snapshot length was not being set.

Bugzilla ID: 840
Fixes: 10f726efe26c ("pdump: support pcapng and filtering")
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
lib/pdump/rte_pdump.c

index 71602685d5444dc6edb7390eebb4bd51658c08d1..3086b2a1688b168dd37c1b939d22554522babf43 100644 (file)
@@ -631,6 +631,9 @@ pdump_enable_by_deviceid(const char *device_id, uint16_t queue,
        if (ret < 0)
                return ret;
 
+       if (snaplen == 0)
+               snaplen = UINT32_MAX;
+
        return pdump_prepare_client_request(device_id, queue, flags, snaplen,
                                            ENABLE, ring, mp, prm);
 }