port.
1. When we add a port with SG disabled and no SG associated, the
port does not have InterfaceAcl Augmentation. this is causing
NullPointerException when port is updated with SG enable. So handled
the NPE, fixed the issue and update flow will add the required fixed
rules.
Change-Id: I0199f7eabad7f1b6caec8ce53412d86e50f63f51
Signed-off-by: kiranvasudeva <kirankumar.v@altencalsoftlabs.com>
}
if (aclInPortAfter != null && aclInPortAfter.isPortSecurityEnabled()
|| aclInPortBefore != null && aclInPortBefore.isPortSecurityEnabled()) {
- boolean isSgChanged =
- isSecurityGroupsChanged(aclInPortBefore.getSecurityGroups(), aclInPortAfter.getSecurityGroups());
+ List<Uuid> sgsBefore = null;
+ if (aclInPortBefore != null) {
+ sgsBefore = aclInPortBefore.getSecurityGroups();
+ }
+ boolean isSgChanged = isSecurityGroupsChanged(sgsBefore, aclInPortAfter.getSecurityGroups());
AclInterface aclInterfaceAfter =
addOrUpdateAclInterfaceCache(interfaceId, aclInPortAfter, isSgChanged, interfaceState);