public abstract class AbstractIngressAclServiceImpl extends AbstractAclServiceImpl
Note: Table names used are w.r.t switch. Hence, switch ingress is VM egress and vice versa.
aclDataUtil, aclServiceUtils, dataBroker, mdsalManager, serviceMode
Constructor and Description |
---|
AbstractIngressAclServiceImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker,
org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager,
AclDataUtil aclDataUtil,
AclServiceUtils aclServiceUtils)
Initialize the member variables.
|
Modifier and Type | Method and Description |
---|---|
void |
bindService(AclInterface aclInterface)
Bind service.
|
protected org.opendaylight.genius.mdsalutil.MatchInfoBase |
buildLPortTagMatch(int lportTag) |
protected short |
getIngressAclFilterTable() |
protected short |
getIngressAclRemoteAclTable() |
protected short |
getStatefulIngressAclApplyOnExistingTrafficTable() |
protected void |
ingressAclDhcpAllowServerTraffic(BigInteger dpId,
String dhcpMacAddress,
int lportTag,
int addOrRemove,
int protoPortMatchPriority)
Add rule to ensure only DHCP server traffic from the specified mac is
allowed.
|
protected void |
ingressAclDhcpv6AllowServerTraffic(BigInteger dpId,
String dhcpMacAddress,
int lportTag,
int addOrRemove,
Integer protoPortMatchPriority)
Add rule to ensure only DHCPv6 server traffic from the specified mac is
allowed.
|
protected void |
programAceRule(AclInterface port,
int addOrRemove,
String aclName,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace,
List<AllowedAddressPairs> syncAllowedAddresses)
Programs the ace custom rule.
|
protected boolean |
programAclRules(AclInterface port,
List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid> aclUuidList,
int addOrRemove)
Programs the acl custom rules.
|
protected void |
programArpRule(BigInteger dpId,
int lportTag,
int addOrRemove)
Adds the rule to allow arp packets.
|
protected void |
programBroadcastRules(AclInterface port,
int addOrRemove)
Programs broadcast rules.
|
protected void |
programGeneralFixedRules(AclInterface port,
String dhcpMacAddress,
List<AllowedAddressPairs> allowedAddresses,
AclServiceManager.Action action,
int addOrRemove)
Program the default anti-spoofing rules.
|
protected abstract void |
programSpecificFixedRules(BigInteger dpid,
String dhcpMacAddress,
List<AllowedAddressPairs> allowedAddresses,
int lportTag,
String portId,
AclServiceManager.Action action,
int addOrRemove)
Program conntrack rules.
|
protected abstract String |
syncSpecificAclFlow(BigInteger dpId,
int lportTag,
int addOrRemove,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace,
String portId,
Map<String,List<org.opendaylight.genius.mdsalutil.MatchInfoBase>> flowMap,
String flowName) |
protected void |
unbindService(AclInterface aclInterface)
Unbind service.
|
protected void |
updateArpForAllowedAddressPairs(BigInteger dpId,
int lportTag,
List<AllowedAddressPairs> deletedAAP,
List<AllowedAddressPairs> addedAAP)
Update arp for allowed address pairs.
|
protected void |
updateRemoteAclTableForPort(AclInterface port,
org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid acl,
int addOrRemove,
AllowedAddressPairs ip,
BigInteger aclId,
BigInteger dpId) |
applyAce, applyAcl, bindAcl, collectDpns, getAclFlowPriority, getDispatcherTableResubmitInstructions, getIpPrefixOrAddress, getOperAsString, rebindAcl, removeAce, removeAcl, syncFlow, unbindAcl, updateAcl
public AbstractIngressAclServiceImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils)
dataBroker
- the data broker instance.mdsalManager
- the mdsal manager.aclDataUtil
- the acl data util.aclServiceUtils
- the acl service util.public void bindService(AclInterface aclInterface)
bindService
in class AbstractAclServiceImpl
aclInterface
- the acl interfaceprotected void unbindService(AclInterface aclInterface)
unbindService
in class AbstractAclServiceImpl
aclInterface
- the acl interfaceprotected abstract void programSpecificFixedRules(BigInteger dpid, String dhcpMacAddress, List<AllowedAddressPairs> allowedAddresses, int lportTag, String portId, AclServiceManager.Action action, int addOrRemove)
programSpecificFixedRules
in class AbstractAclServiceImpl
dpid
- the dpiddhcpMacAddress
- the dhcp mac address.allowedAddresses
- the allowed addresseslportTag
- the lport tagaddOrRemove
- add or remove the flowportId
- the port idaction
- add/modify/remove actionprotected void programGeneralFixedRules(AclInterface port, String dhcpMacAddress, List<AllowedAddressPairs> allowedAddresses, AclServiceManager.Action action, int addOrRemove)
AbstractAclServiceImpl
programGeneralFixedRules
in class AbstractAclServiceImpl
port
- the acl interfacedhcpMacAddress
- the dhcp mac address.allowedAddresses
- the allowed addressesaction
- add/modify/remove actionaddOrRemove
- addorRemoveprotected void updateArpForAllowedAddressPairs(BigInteger dpId, int lportTag, List<AllowedAddressPairs> deletedAAP, List<AllowedAddressPairs> addedAAP)
AbstractAclServiceImpl
updateArpForAllowedAddressPairs
in class AbstractAclServiceImpl
dpId
- the dp idlportTag
- the lport tagdeletedAAP
- the deleted allowed address pairsaddedAAP
- the added allowed address pairsprotected boolean programAclRules(AclInterface port, List<org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid> aclUuidList, int addOrRemove)
AbstractAclServiceImpl
programAclRules
in class AbstractAclServiceImpl
port
- acl interfaceaclUuidList
- the list of acl uuid to be appliedaddOrRemove
- whether to delete or add flowprotected void programAceRule(AclInterface port, int addOrRemove, String aclName, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace, List<AllowedAddressPairs> syncAllowedAddresses)
AbstractAclServiceImpl
programAceRule
in class AbstractAclServiceImpl
port
- acl interfaceaddOrRemove
- whether to delete or add flowaclName
- the acl nameace
- rule to be programsyncAllowedAddresses
- the allowed addressesprotected void updateRemoteAclTableForPort(AclInterface port, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.yang.types.rev130715.Uuid acl, int addOrRemove, AllowedAddressPairs ip, BigInteger aclId, BigInteger dpId)
updateRemoteAclTableForPort
in class AbstractAclServiceImpl
protected short getIngressAclFilterTable()
protected short getIngressAclRemoteAclTable()
protected short getStatefulIngressAclApplyOnExistingTrafficTable()
protected abstract String syncSpecificAclFlow(BigInteger dpId, int lportTag, int addOrRemove, org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.access.control.list.rev160218.access.lists.acl.access.list.entries.Ace ace, String portId, Map<String,List<org.opendaylight.genius.mdsalutil.MatchInfoBase>> flowMap, String flowName)
protected void ingressAclDhcpAllowServerTraffic(BigInteger dpId, String dhcpMacAddress, int lportTag, int addOrRemove, int protoPortMatchPriority)
dpId
- the dpiddhcpMacAddress
- the DHCP server mac addresslportTag
- the lport tagaddOrRemove
- is write or deleteprotoPortMatchPriority
- the priorityprotected void ingressAclDhcpv6AllowServerTraffic(BigInteger dpId, String dhcpMacAddress, int lportTag, int addOrRemove, Integer protoPortMatchPriority)
dpId
- the dpiddhcpMacAddress
- the DHCP server mac addresslportTag
- the lport tagaddOrRemove
- is write or deleteprotoPortMatchPriority
- the priorityprotected void programArpRule(BigInteger dpId, int lportTag, int addOrRemove)
dpId
- the dpIdlportTag
- the lport tagaddOrRemove
- whether to add or remove the flowprotected void programBroadcastRules(AclInterface port, int addOrRemove)
programBroadcastRules
in class AbstractAclServiceImpl
port
- the Acl Interface portaddOrRemove
- whether to delete or add flowprotected org.opendaylight.genius.mdsalutil.MatchInfoBase buildLPortTagMatch(int lportTag)
Copyright © 2018 OpenDaylight. All rights reserved.