Skip to content

[dualtor][sniffer] Explicitly set listen ports#18299

Merged
wangxin merged 1 commit intosonic-net:masterfrom
lolyu:fix_dualtor_sniffer
May 12, 2025
Merged

[dualtor][sniffer] Explicitly set listen ports#18299
wangxin merged 1 commit intosonic-net:masterfrom
lolyu:fix_dualtor_sniffer

Conversation

@lolyu
Copy link
Collaborator

@lolyu lolyu commented May 9, 2025

Description of PR

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

On scapy with version v2.40 and under, the sniffer will capture packets on every interface if no interface is given.
On scapy with version v.2.50 and higher, the sniffer will capture packets on conf.iface if no interface is given; on the ptf, conf.iface is mgmt, so dual_tor_sniffer is not able to capture any meaningful dataplane packets.

secdev/scapy#1420

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?

Let dual_tor_sniffer explicitly sniff on dataplane ports (any ptf ports starting with eth)

How did you verify/test it?

Run dualtor I/O testcase.

Any platform specific information?

Supported testbed topology if it's a new test case?

Documentation

Signed-off-by: Longxiang Lyu <[email protected]>
@mssonicbld
Copy link
Collaborator

/azp run

@lolyu lolyu requested a review from yxieca May 9, 2025 04:19
@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lolyu lolyu requested a review from bingwang-ms May 9, 2025 04:19
@wangxin wangxin merged commit 9f85a42 into sonic-net:master May 12, 2025
18 checks passed
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request May 13, 2025
What is the motivation for this PR?
On scapy with version v2.40 and under, the sniffer will capture packets on every interface if no interface is given.
On scapy with version v.2.50 and higher, the sniffer will capture packets on conf.iface if no interface is given; on the ptf, conf.iface is mgmt, so dual_tor_sniffer is not able to capture any meaningful dataplane packets.

secdev/scapy#1420

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Let dual_tor_sniffer explicitly sniff on dataplane ports (any ptf ports starting with eth)

How did you verify/test it?
Run dualtor I/O testcase.

Signed-off-by: Longxiang Lyu <[email protected]>
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202411: #18362

wangxin pushed a commit that referenced this pull request May 19, 2025
What is the motivation for this PR?
On scapy with version v2.40 and under, the sniffer will capture packets on every interface if no interface is given.
On scapy with version v.2.50 and higher, the sniffer will capture packets on conf.iface if no interface is given; on the ptf, conf.iface is mgmt, so dual_tor_sniffer is not able to capture any meaningful dataplane packets.

secdev/scapy#1420

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Let dual_tor_sniffer explicitly sniff on dataplane ports (any ptf ports starting with eth)

How did you verify/test it?
Run dualtor I/O testcase.

Signed-off-by: Longxiang Lyu <[email protected]>
Co-authored-by: Longxiang Lyu <[email protected]>
opcoder0 pushed a commit to opcoder0/sonic-mgmt that referenced this pull request Dec 8, 2025
What is the motivation for this PR?
On scapy with version v2.40 and under, the sniffer will capture packets on every interface if no interface is given.
On scapy with version v.2.50 and higher, the sniffer will capture packets on conf.iface if no interface is given; on the ptf, conf.iface is mgmt, so dual_tor_sniffer is not able to capture any meaningful dataplane packets.

secdev/scapy#1420

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Let dual_tor_sniffer explicitly sniff on dataplane ports (any ptf ports starting with eth)

How did you verify/test it?
Run dualtor I/O testcase.

Signed-off-by: Longxiang Lyu <[email protected]>
AharonMalkin pushed a commit to AharonMalkin/sonic-mgmt that referenced this pull request Dec 16, 2025
What is the motivation for this PR?
On scapy with version v2.40 and under, the sniffer will capture packets on every interface if no interface is given.
On scapy with version v.2.50 and higher, the sniffer will capture packets on conf.iface if no interface is given; on the ptf, conf.iface is mgmt, so dual_tor_sniffer is not able to capture any meaningful dataplane packets.

secdev/scapy#1420

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Let dual_tor_sniffer explicitly sniff on dataplane ports (any ptf ports starting with eth)

How did you verify/test it?
Run dualtor I/O testcase.

Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Aharon Malkin <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Dec 21, 2025
What is the motivation for this PR?
On scapy with version v2.40 and under, the sniffer will capture packets on every interface if no interface is given.
On scapy with version v.2.50 and higher, the sniffer will capture packets on conf.iface if no interface is given; on the ptf, conf.iface is mgmt, so dual_tor_sniffer is not able to capture any meaningful dataplane packets.

secdev/scapy#1420

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Let dual_tor_sniffer explicitly sniff on dataplane ports (any ptf ports starting with eth)

How did you verify/test it?
Run dualtor I/O testcase.

Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
gshemesh2 pushed a commit to gshemesh2/sonic-mgmt that referenced this pull request Jan 26, 2026
What is the motivation for this PR?
On scapy with version v2.40 and under, the sniffer will capture packets on every interface if no interface is given.
On scapy with version v.2.50 and higher, the sniffer will capture packets on conf.iface if no interface is given; on the ptf, conf.iface is mgmt, so dual_tor_sniffer is not able to capture any meaningful dataplane packets.

secdev/scapy#1420

Signed-off-by: Longxiang Lyu [email protected]

How did you do it?
Let dual_tor_sniffer explicitly sniff on dataplane ports (any ptf ports starting with eth)

How did you verify/test it?
Run dualtor I/O testcase.

Signed-off-by: Longxiang Lyu <[email protected]>
Signed-off-by: Guy Shemesh <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants