Class IngressAclServiceImpl
- java.lang.Object
-
- org.opendaylight.netvirt.aclservice.AbstractAclServiceImpl
-
- org.opendaylight.netvirt.aclservice.IngressAclServiceImpl
-
- All Implemented Interfaces:
AclServiceListener
public class IngressAclServiceImpl extends AbstractAclServiceImpl
Provides the implementation for ingress (w.r.t VM) ACL service.Note: Table names used are w.r.t switch. Hence, switch ingress is VM egress and vice versa.
-
-
Field Summary
-
Fields inherited from class org.opendaylight.netvirt.aclservice.AbstractAclServiceImpl
aclDataUtil, aclInterfaceCache, aclServiceUtils, direction, directionString, jobCoordinator, mdsalManager, serviceMode, txRunner
-
-
Constructor Summary
Constructors Constructor Description IngressAclServiceImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, AclInterfaceCache aclInterfaceCache)Initialize the member variables.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidallowDhcpClientTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCP client traffic is allowed.protected voidallowDhcpv6ClientTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCPv6 client traffic is allowed.protected voidallowIcmpTrafficToDhcpServer(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, int addOrRemove)Add rules to allow ICMP traffic for DHCP server.voidbindService(AclInterface aclInterface)Bind service.protected voiddropTrafficToDhcpServer(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to drop BUM traffic to DHCP Server.protected shortgetAclCommitterTable()protected shortgetAclConntrackSenderTable()protected shortgetAclFilterCumDispatcherTable()protected shortgetAclForExistingTrafficTable()protected shortgetAclRemoteAclTable()protected shortgetAclRuleBasedFilterTable()protected voidingressAclDhcpAllowServerTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCP server traffic from the specified mac is allowed.protected voidingressAclDhcpv6AllowServerTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCPv6 server traffic from the specified mac is allowed.protected booleanisValidDirection(java.lang.Class<? extends DirectionBase> direction)protected voidprocessDhcpServiceUpdate(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, int addOrRemove)Programs DHCP service flows.protected voidprogramAntiSpoofingRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, AclServiceManager.Action action, int addOrRemove)Programs the anti-spoofing rules.protected voidprogramArpRule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Adds the rule to allow arp packets.protected voidprogramBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)Programs broadcast rules.protected voidprogramDhcpService(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)Programs DHCP Service flows.protected voidprogramGotoClassifierTableRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<AllowedAddressPairs> aaps, int lportTag, int addOrRemove)protected voidprogramIcmpv6RARule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnets, int addOrRemove)protected voidprogramRemoteAclTableFlow(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.Integer aclTag, AllowedAddressPairs aap, int addOrRemove)protected voidprogramSubnetBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnetInfoList, int addOrRemove)Programs broadcast rules.protected voidunbindService(AclInterface aclInterface)Unbind service.-
Methods inherited from class org.opendaylight.netvirt.aclservice.AbstractAclServiceImpl
addFlowEntryToList, applyAce, applyAcl, bindAcl, collectDpns, getDispatcherTableResubmitInstructions, getDispatcherTableResubmitInstructions, getElanIdFromAclInterface, getRemoteAclTags, handleRemoteAclUpdate, programAceRule, programAceSpecificFlows, programAclCommitRuleForConntrack, programAclCommitRuleForNonConntrack, programAclCommitRules, programAclDispatcherTable, programAclPortSpecificFixedRules, programAclRuleMissDropRule, programAclRules, programConntrackInvalidDropRule, programConntrackRecircRule, programConntrackRecircRules, programFirstRemoteAclEntryInDispatcherTable, programFlows, programForAceNotHavingRemoteAclId, programLastRemoteAclEntryInDispatcherTable, programPortSpecificDropRules, removeAce, removeAcl, unbindAcl, updateAcl, updateRemoteAcl
-
-
-
-
Constructor Detail
-
IngressAclServiceImpl
public IngressAclServiceImpl(org.opendaylight.controller.md.sal.binding.api.DataBroker dataBroker, org.opendaylight.genius.mdsalutil.interfaces.IMdsalApiManager mdsalManager, AclDataUtil aclDataUtil, AclServiceUtils aclServiceUtils, org.opendaylight.infrautils.jobcoordinator.JobCoordinator jobCoordinator, AclInterfaceCache aclInterfaceCache)Initialize the member variables.- Parameters:
dataBroker- the data broker instance.mdsalManager- the mdsal manager.aclDataUtil- the acl data util.aclServiceUtils- the acl service util.jobCoordinator- the job coordinatoraclInterfaceCache- the acl interface cache
-
-
Method Detail
-
bindService
public void bindService(AclInterface aclInterface)
Bind service.- Specified by:
bindServicein classAbstractAclServiceImpl- Parameters:
aclInterface- the acl interface
-
unbindService
protected void unbindService(AclInterface aclInterface)
Unbind service.- Specified by:
unbindServicein classAbstractAclServiceImpl- Parameters:
aclInterface- the acl interface
-
programDhcpService
protected void programDhcpService(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)Programs DHCP Service flows.- Specified by:
programDhcpServicein classAbstractAclServiceImpl- Parameters:
flowEntries- the flow entriesport- the acl interfaceaction- add/modify/remove actionaddOrRemove- addorRemove
-
processDhcpServiceUpdate
protected void processDhcpServiceUpdate(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, int addOrRemove)Programs DHCP service flows.- Specified by:
processDhcpServiceUpdatein classAbstractAclServiceImpl- Parameters:
flowEntries- the flow entriesport- the acl interfaceallowedAddresses- the allowed addressesaddOrRemove- addorRemove
-
programAntiSpoofingRules
protected void programAntiSpoofingRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, AclServiceManager.Action action, int addOrRemove)Description copied from class:AbstractAclServiceImplPrograms the anti-spoofing rules.- Specified by:
programAntiSpoofingRulesin classAbstractAclServiceImpl- Parameters:
flowEntries- the flow entriesport- the acl interfaceallowedAddresses- the allowed addressesaction- add/modify/remove actionaddOrRemove- addorRemove
-
programGotoClassifierTableRules
protected void programGotoClassifierTableRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.util.List<AllowedAddressPairs> aaps, int lportTag, int addOrRemove)- Specified by:
programGotoClassifierTableRulesin classAbstractAclServiceImpl
-
programRemoteAclTableFlow
protected void programRemoteAclTableFlow(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, java.lang.Integer aclTag, AllowedAddressPairs aap, int addOrRemove)- Specified by:
programRemoteAclTableFlowin classAbstractAclServiceImpl
-
ingressAclDhcpAllowServerTraffic
protected void ingressAclDhcpAllowServerTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCP server traffic from the specified mac is allowed.- Parameters:
flowEntries- the flow entriesdpId- the dpidlportTag- the lport tagaddOrRemove- is write or delete
-
ingressAclDhcpv6AllowServerTraffic
protected void ingressAclDhcpv6AllowServerTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCPv6 server traffic from the specified mac is allowed.- Parameters:
flowEntries- the flow entriesdpId- the dpidlportTag- the lport tagaddOrRemove- is write or delete
-
programIcmpv6RARule
protected void programIcmpv6RARule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnets, int addOrRemove)- Specified by:
programIcmpv6RARulein classAbstractAclServiceImpl
-
programArpRule
protected void programArpRule(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Adds the rule to allow arp packets.- Parameters:
flowEntries- the flow entriesdpId- the dpIdlportTag- the lport tagaddOrRemove- whether to add or remove the flow
-
programBroadcastRules
protected void programBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, AclServiceManager.Action action, int addOrRemove)Programs broadcast rules.- Specified by:
programBroadcastRulesin classAbstractAclServiceImpl- Parameters:
flowEntries- the flow entriesport- the Acl Interface portaddOrRemove- whether to delete or add flow
-
programSubnetBroadcastRules
protected void programSubnetBroadcastRules(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<SubnetInfo> subnetInfoList, int addOrRemove)Programs broadcast rules.- Specified by:
programSubnetBroadcastRulesin classAbstractAclServiceImpl- Parameters:
flowEntries- the flow entriesport- the Acl Interface portsubnetInfoList- the port subnet info listaddOrRemove- whether to delete or add flow
-
allowDhcpClientTraffic
protected void allowDhcpClientTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCP client traffic is allowed.- Parameters:
flowEntries- the flow entriesdpId- the dpidlportTag- the lport tagaddOrRemove- is write or delete
-
allowDhcpv6ClientTraffic
protected void allowDhcpv6ClientTraffic(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to ensure only DHCPv6 client traffic is allowed.- Parameters:
flowEntries- the flow entriesdpId- the dpidlportTag- the lport tagaddOrRemove- is write or delete
-
allowIcmpTrafficToDhcpServer
protected void allowIcmpTrafficToDhcpServer(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, AclInterface port, java.util.List<AllowedAddressPairs> allowedAddresses, int addOrRemove)Add rules to allow ICMP traffic for DHCP server.- Parameters:
flowEntries- the flow entriesport- the Acl Interface portallowedAddresses- the allowed addressesaddOrRemove- the lport tag
-
dropTrafficToDhcpServer
protected void dropTrafficToDhcpServer(java.util.List<org.opendaylight.genius.mdsalutil.FlowEntity> flowEntries, org.opendaylight.yangtools.yang.common.Uint64 dpId, int lportTag, int addOrRemove)Add rule to drop BUM traffic to DHCP Server.- Parameters:
flowEntries- the flow entriesdpId- the dpidlportTag- the lport tagaddOrRemove- is write or delete
-
isValidDirection
protected boolean isValidDirection(java.lang.Class<? extends DirectionBase> direction)
- Specified by:
isValidDirectionin classAbstractAclServiceImpl
-
getAclConntrackSenderTable
protected short getAclConntrackSenderTable()
- Specified by:
getAclConntrackSenderTablein classAbstractAclServiceImpl
-
getAclForExistingTrafficTable
protected short getAclForExistingTrafficTable()
- Specified by:
getAclForExistingTrafficTablein classAbstractAclServiceImpl
-
getAclFilterCumDispatcherTable
protected short getAclFilterCumDispatcherTable()
- Specified by:
getAclFilterCumDispatcherTablein classAbstractAclServiceImpl
-
getAclRuleBasedFilterTable
protected short getAclRuleBasedFilterTable()
- Specified by:
getAclRuleBasedFilterTablein classAbstractAclServiceImpl
-
getAclRemoteAclTable
protected short getAclRemoteAclTable()
- Specified by:
getAclRemoteAclTablein classAbstractAclServiceImpl
-
getAclCommitterTable
protected short getAclCommitterTable()
- Specified by:
getAclCommitterTablein classAbstractAclServiceImpl
-
-