Skip to content

Allow IPv6 addresses for ERSPAN sessions - #4763

Open
Lip-sun wants to merge 1 commit into
sonic-net:masterfrom
Lip-sun:fix/3747-ipv6-erspan-cli
Open

Allow IPv6 addresses for ERSPAN sessions#4763
Lip-sun wants to merge 1 commit into
sonic-net:masterfrom
Lip-sun:fix/3747-ipv6-erspan-cli

Conversation

@Lip-sun

@Lip-sun Lip-sun commented Aug 9, 2026

Copy link
Copy Markdown

Fixes #3747

Summary

  • Allow IPv4 and IPv6 source/destination addresses for config mirror_session erspan add.
  • Keep the legacy config mirror_session add command IPv4-only.
  • Add CLI coverage for a valid IPv6 ERSPAN session.

Root cause

The nested ERSPAN command used validate_ipv4_address for both endpoints, so valid IPv6 addresses were rejected before add_erspan() could update CONFIG_DB.

Validation

  • python3 -m py_compile config/main.py tests/config_mirror_session_test.py
  • git diff --check
  • Built the sonic_utilities wheel with sonic-buildimage.
  • QEMU VS: reproduced the original rejection; installed the patched wheel; created an IPv6 ERSPAN session and verified its MIRROR_SESSION CONFIG_DB entry.

Test note

The targeted pytest suite was not run locally because an unrelated sonic_config_engine prerequisite test fails in this local VS build environment while locating platform metadata. The functional QEMU validation above completed successfully.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Aug 9, 2026

Copy link
Copy Markdown

CLA Signed
The committers listed above are authorized under a signed CLA.

  • ✅ login: Lip-sun / name: Lip (8204f0f)

@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@Lip-sun
Lip-sun force-pushed the fix/3747-ipv6-erspan-cli branch from 8204f0f to 39dab7d Compare August 9, 2026 16:45
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@mssonicbld

Copy link
Copy Markdown
Collaborator

Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks!

---Powered by SONiC BuildBot

Signed-off-by: Lip <127746398+Lip-sun@users.noreply.github.com>
@Lip-sun
Lip-sun force-pushed the fix/3747-ipv6-erspan-cli branch from 39dab7d to 16f2d5d Compare August 10, 2026 07:15
@mssonicbld

Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).

@Lip-sun
Lip-sun marked this pull request as ready for review August 10, 2026 08:10
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
There may be pipelines that require an authorized user to comment /azp run to run.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot configure IPv6 ERSPAN sessions from the CLI

2 participants