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