X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fnetworkconfiguration%2Fneutron%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fnetworkconfig%2Fneutron%2FNeutronSubnet_IPAllocationPool.java;h=75da310b2b63b9f967afdbc354fba1ee3871dfa3;hb=7e24111a0842d66187c752022aa975c411b42cca;hp=15ff548a532c1a14f6ec5e963c1734ca40278aab;hpb=751f9472c379195863d53039016ae7be866d0f43;p=controller.git diff --git a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet_IPAllocationPool.java b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet_IPAllocationPool.java index 15ff548a53..75da310b2b 100644 --- a/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet_IPAllocationPool.java +++ b/opendaylight/networkconfiguration/neutron/src/main/java/org/opendaylight/controller/networkconfig/neutron/NeutronSubnet_IPAllocationPool.java @@ -77,15 +77,18 @@ public class NeutronSubnet_IPAllocationPool implements Serializable { * * @param inputString * IPv4 address in dotted decimal format - * @returns high-endian representation of the IPv4 address as a long + * @returns high-endian representation of the IPv4 address as a long. + * This method will return 0 if the input is null. */ static long convert(String inputString) { long ans = 0; - String[] parts = inputString.split("\\."); - for (String part: parts) { - ans <<= 8; - ans |= Integer.parseInt(part); + if (inputString != null) { + String[] parts = inputString.split("\\."); + for (String part: parts) { + ans <<= 8; + ans |= Integer.parseInt(part); + } } return ans; } @@ -149,6 +152,9 @@ public class NeutronSubnet_IPAllocationPool implements Serializable { if (i != gIP) { p.setPoolStart(poolStart); poolStarted = true; + } else { + //FIX for bug 533 + p.setPoolStart(NeutronSubnet_IPAllocationPool.longtoIP(i+1)); } } if (i == eIP) {