Skip to content

Commit

Permalink
Fix fabric port conditional check
Browse files Browse the repository at this point in the history
Summary: Fix conditional check implemented in D63735194 which mistakenly printed loopback IPs for fabric ports in the fboss2 show interface command.

Reviewed By: shri-khare

Differential Revision: D64424798

fbshipit-source-id: e0f54f244be4df1c333cd3f14d1c7699d1126d6d
  • Loading branch information
jleung51 authored and facebook-github-bot committed Oct 15, 2024
1 parent 7bbddb3 commit d87e0e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fboss/cli/fboss2/commands/show/interface/CmdShowInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,9 @@ class CmdShowInterface
std::string name = *interface.name();
std::vector<std::string> prefixes;

if (interface.portType() == cfg::PortType::FABRIC_PORT ||
// TODO (jycleung) portType is a new field addition to the interface.
// When D63407523 is rolled out to the fleet, remove the name check.
if (interface.portType() != cfg::PortType::FABRIC_PORT &&
!name.starts_with("fab")) { // Skip addresses for fabric ports
for (const auto& prefix : *interface.prefixes()) {
prefixes.push_back(
Expand Down

0 comments on commit d87e0e4

Please sign in to comment.