Skip to content

fix: improve LLDP remote port labels for mixed neighbors#10

Merged
rokernel merged 1 commit intomasterfrom
fix/lldp-remote-port-display
Feb 24, 2026
Merged

fix: improve LLDP remote port labels for mixed neighbors#10
rokernel merged 1 commit intomasterfrom
fix/lldp-remote-port-display

Conversation

@rokernel
Copy link
Owner

Summary

  • extend sonic_lldp_neighbor_info with remote_port_desc, remote_port_id_subtype, and remote_port_display
  • keep remote_port_id for protocol fidelity but add display-friendly field selection logic
  • use remote_port_desc as display when subtype is local/mac (7/3) to avoid opaque IDs like 535 in dashboards
  • update fixtures and tests to cover SONiC and Juniper-like LLDP examples

Why

Some neighbors advertise LLDP PortID as a local identifier (for example 535) while the operator-friendly interface is in Port Description (ge-0/0/15.0). This change makes dashboard labels consistent without losing raw LLDP PortID.

Verification

  • go test ./...
  • targeted runtime test on 192.168.240.124:
    • sonic_lldp_neighbor_info{local_interface=\"eth0\", ..., remote_port_id=\"535\", remote_port_desc=\"ge-0/0/15.0\", remote_port_display=\"ge-0/0/15.0\"} 1

@rokernel rokernel merged commit 0d49742 into master Feb 24, 2026
2 checks passed
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.

1 participant