Class 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.

    • 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 coordinator
        aclInterfaceCache - the acl interface cache
    • Method Detail

      • 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:
        programDhcpService in class AbstractAclServiceImpl
        Parameters:
        flowEntries - the flow entries
        port - the acl interface
        action - add/modify/remove action
        addOrRemove - 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:
        processDhcpServiceUpdate in class AbstractAclServiceImpl
        Parameters:
        flowEntries - the flow entries
        port - the acl interface
        allowedAddresses - the allowed addresses
        addOrRemove - 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:
        programGotoClassifierTableRules in class AbstractAclServiceImpl
      • 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:
        programRemoteAclTableFlow in class AbstractAclServiceImpl
      • 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 entries
        dpId - the dpid
        lportTag - the lport tag
        addOrRemove - 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 entries
        dpId - the dpid
        lportTag - the lport tag
        addOrRemove - is write or delete
      • 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 entries
        dpId - the dpId
        lportTag - the lport tag
        addOrRemove - 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:
        programBroadcastRules in class AbstractAclServiceImpl
        Parameters:
        flowEntries - the flow entries
        port - the Acl Interface port
        addOrRemove - 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:
        programSubnetBroadcastRules in class AbstractAclServiceImpl
        Parameters:
        flowEntries - the flow entries
        port - the Acl Interface port
        subnetInfoList - the port subnet info list
        addOrRemove - 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 entries
        dpId - the dpid
        lportTag - the lport tag
        addOrRemove - 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 entries
        dpId - the dpid
        lportTag - the lport tag
        addOrRemove - 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 entries
        port - the Acl Interface port
        allowedAddresses - the allowed addresses
        addOrRemove - 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 entries
        dpId - the dpid
        lportTag - the lport tag
        addOrRemove - is write or delete