From b6aabc3634ff203127326cfcbe615aeb447ca337 Mon Sep 17 00:00:00 2001 From: Andy Fingerhut Date: Tue, 18 Feb 2025 02:05:50 +0000 Subject: [PATCH] Fix a bug Signed-off-by: Andy Fingerhut --- src/ptf/pcap_writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ptf/pcap_writer.py b/src/ptf/pcap_writer.py index 06161df..ec32ef7 100644 --- a/src/ptf/pcap_writer.py +++ b/src/ptf/pcap_writer.py @@ -31,7 +31,7 @@ def __init__(self, filename, linktype=LINKTYPE_PPI): as the value of the optional parameter 'linktype'. """ self.stream = open(filename, "wb") - self.linktype = LINKTYPE_ETHERNET + self.linktype = linktype if self.linktype == LINKTYPE_ETHERNET: self.ppi_len = 0 elif self.linktype == LINKTYPE_PPI: