commit | bb4f541bb2cdbdec37df3a31395086b0839ab3fc | [log] [tgz] |
---|---|---|
author | Jian Li <pyguni@gmail.com> | Thu Apr 12 09:48:50 2018 +0900 |
committer | Jian Li <pyguni@gmail.com> | Thu Apr 12 01:43:46 2018 +0000 |
tree | de472279b8b070bd97b03ab45ad43977e80efb0b | |
parent | 700648c99327938868bbc9145352a2bb20ee7645 [diff] |
Fix: resolve NPE by obtaining networkId from subnet instead of port Change-Id: Ib49a8627e601bc893062069daf6f266fcc8e8460
diff --git a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java index b3340c6..7e15b25 100644 --- a/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java +++ b/apps/openstacknetworking/app/src/main/java/org/onosproject/openstacknetworking/impl/OpenstackSwitchingArpHandler.java
@@ -330,7 +330,8 @@ return false; } - Network network = osNetworkService.network(event.port().getNetworkId()); + Network network = osNetworkService.network(osSubnet.getNetworkId()); + if (network == null) { log.warn("Network is not specified."); return false;