Class: Dcmgr::VNet::Tasks::DropArpToHost

Inherits:
Dcmgr::VNet::Task show all
Includes:
Netfilter
Defined in:
lib/dcmgr/vnet/tasks/drop_arp_to_host.rb

Overview

Drops all ARP packets coming into the host

Instance Attribute Summary collapse

Attributes inherited from Dcmgr::VNet::Task

#rules

Instance Method Summary collapse

Constructor Details

#initializeDropArpToHost

Returns a new instance of DropArpToHost.



13
14
15
16
17
18
19
# File 'lib/dcmgr/vnet/tasks/drop_arp_to_host.rb', line 13

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

Instance Attribute Details

#enable_loggingObject (readonly)

Returns the value of attribute enable_logging.



10
11
12
# File 'lib/dcmgr/vnet/tasks/drop_arp_to_host.rb', line 10

def enable_logging
  @enable_logging
end

#log_prefixObject (readonly)

Returns the value of attribute log_prefix.



11
12
13
# File 'lib/dcmgr/vnet/tasks/drop_arp_to_host.rb', line 11

def log_prefix
  @log_prefix
end