Sha256: d02c017aebaad16b22e5c048290300889ab8dd0be6a30bd0db06dffc1db32811

Contents?: true

Size: 730 Bytes

Versions: 2

Compression:

Stored size: 730 Bytes

Contents

# -*- coding: utf-8 -*-

module Dcmgr
  module VNet
    module Tasks
    
      # Drops all ARP packets coming into the host
      class DropArpToHost < Task
        include Dcmgr::VNet::Netfilter
        attr_reader :enable_logging
        attr_reader :log_prefix
        
        def initialize
          super()
          
          # Drop forwarding to host
          #self.rules << EbtablesRule.new(:filter,:input,:arp,:outgoing,"--log-level 4 --log-ip --log-arp --log-prefix '#{self.log_prefix}' -j CONTINUE") if self.enable_logging
          self.rules << EbtablesRule.new(:filter,:input,:arp,:outgoing,"#{EbtablesRule.log_arp(self.log_prefix) if self.enable_logging} -j DROP")
        end
      end
    
    end
  end
end

Version data entries

2 entries across 2 versions & 2 rubygems

Version Path
wakame-vdc-agents-11.12.0 lib/dcmgr/vnet/tasks/drop_arp_to_host.rb
wakame-vdc-dcmgr-11.12.0 lib/dcmgr/vnet/tasks/drop_arp_to_host.rb