Skip to content

Commit 114df3d

Browse files
authored
Forward merge apache/4.13 to master
4.13 forward merge
2 parents 80abb5a + d981edb commit 114df3d

3 files changed

Lines changed: 5 additions & 6 deletions

File tree

core/src/main/java/com/cloud/agent/resource/virtualnetwork/facade/SetNetworkAclConfigItem.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public List<ConfigItem> generateConfig(final NetworkElementCommand cmd) {
7979
// If we check the size of the array, it will fail to setup the network.
8080
// So, let's catch the exception and continue in the loop.
8181
try {
82-
aclRule = new ProtocolAclRule(ruleParts[5], false, Integer.parseInt(ruleParts[1]));
82+
aclRule = new ProtocolAclRule(ruleParts[4], "ACCEPT".equals(ruleParts[5]), Integer.parseInt(ruleParts[1]));
8383
} catch (final Exception e) {
8484
s_logger.warn("Problem occured when reading the entries in the ruleParts array. Actual array size is '" + ruleParts.length + "', but trying to read from index 5.");
8585
continue;
@@ -104,4 +104,4 @@ protected List<ConfigItem> generateConfigItems(final ConfigBase configuration) {
104104

105105
return super.generateConfigItems(configuration);
106106
}
107-
}
107+
}

plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3665,7 +3665,7 @@ public boolean configureNetworkRulesVMSecondaryIP(final Connect conn, final Stri
36653665
cmd.add("network_rules_vmSecondaryIp");
36663666
cmd.add("--vmname", vmName);
36673667
cmd.add("--nicsecips", secIp);
3668-
cmd.add("--action", action);
3668+
cmd.add("--action=" + action);
36693669

36703670
final String result = cmd.execute();
36713671
if (result != null) {

server/src/main/java/com/cloud/network/NetworkServiceImpl.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,10 @@ public NicSecondaryIp allocateSecondaryGuestIP(final long nicId, IpAddresses req
732732
}
733733

734734
try {
735-
if (ipv4Address != null) {
736-
ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(network, podId, ipOwner, ipv4Address);
737-
}
738735
if (ipv6Address != null) {
739736
ip6addr = ipv6AddrMgr.allocatePublicIp6ForGuestNic(network, podId, ipOwner, ipv6Address);
737+
} else {
738+
ipaddr = _ipAddrMgr.allocatePublicIpForGuestNic(network, podId, ipOwner, ipv4Address);
740739
}
741740
if (ipaddr == null && ipv6Address == null) {
742741
throw new InvalidParameterValueException("Allocating ip to guest nic " + nicId + " failed");

0 commit comments

Comments
 (0)