HIGUCHI Yuta
Committed by Gerrit Code Review

LldpLinkProvider: ignore logical port earlier

- No functional change.
  When port link state went down,
  old code attempted to remove logical port,
  which has never been added to LinkDiscovery helper.

Change-Id: Ic6921d99944eecd72bcae02ad3d974836595e1a9
......@@ -353,6 +353,10 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider {
* or calls {@link #removePort(Port)} otherwise.
*/
private void updatePort(LinkDiscovery discoverer, Port port) {
if (port.number().isLogical()) {
// silently ignore logical ports
return;
}
if (rules.isSuppressed(port)) {
log.trace("LinkDiscovery from {} disabled by configuration", port);
removePort(port);
......@@ -365,9 +369,7 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider {
return;
}
if (!port.number().isLogical()) {
discoverer.addPort(port);
}
discoverer.addPort(port);
}
/**
......