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 { ...@@ -353,6 +353,10 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider {
353 * or calls {@link #removePort(Port)} otherwise. 353 * or calls {@link #removePort(Port)} otherwise.
354 */ 354 */
355 private void updatePort(LinkDiscovery discoverer, Port port) { 355 private void updatePort(LinkDiscovery discoverer, Port port) {
356 + if (port.number().isLogical()) {
357 + // silently ignore logical ports
358 + return;
359 + }
356 if (rules.isSuppressed(port)) { 360 if (rules.isSuppressed(port)) {
357 log.trace("LinkDiscovery from {} disabled by configuration", port); 361 log.trace("LinkDiscovery from {} disabled by configuration", port);
358 removePort(port); 362 removePort(port);
...@@ -365,9 +369,7 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider { ...@@ -365,9 +369,7 @@ public class LldpLinkProvider extends AbstractProvider implements LinkProvider {
365 return; 369 return;
366 } 370 }
367 371
368 - if (!port.number().isLogical()) { 372 + discoverer.addPort(port);
369 - discoverer.addPort(port);
370 - }
371 } 373 }
372 374
373 /** 375 /**
......