Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ public class SecurityGroupVMMapVO implements InternalIdentity {
@Column(name = "ip4_address", table = "nics", insertable = false, updatable = false)
private String guestIpAddress;

@Column(name = "ip6_address", table = "nics", insertable = false, updatable = false)
private String guestIpv6Address;

@Column(name = "state", table = "vm_instance", insertable = false, updatable = false)
private State vmState;

Expand Down Expand Up @@ -77,6 +80,10 @@ public String getGuestIpAddress() {
return guestIpAddress;
}

public String getGuestIpv6Address() {
return guestIpv6Address;
}

public long getInstanceId() {
return instanceId;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@ protected Map<PortAndProto, Set<String>> generateRulesForVM(Long userVmId, Secur
String cidr = defaultNic.getIPv4Address();
cidr = cidr + "/32";
cidrs.add(cidr);
if (defaultNic.getIPv6Address() != null) {
cidrs.add(defaultNic.getIPv6Address() + "/64");
}
}
}
} else if (rule.getAllowedSourceIpCidr() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,9 @@ protected Map<PortAndProto, Set<String>> generateRulesForVM(Long userVmId, Secur
//did a join with the nics table
String cidr = ngmapVO.getGuestIpAddress() + "/32";
cidrs.add(cidr);
if (ngmapVO.getGuestIpv6Address() != null) {
cidrs.add(ngmapVO.getGuestIpv6Address() + "/64");
}
}
} else if (rule.getAllowedSourceIpCidr() != null) {
cidrs.add(rule.getAllowedSourceIpCidr());
Expand Down
Loading