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,10 +369,8 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider {
return;
}
if (!port.number().isLogical()) {
discoverer.addPort(port);
}
}
/**
* Removes a port from the specified discovery helper.
......