Class: Dcmgr::VNet::Tasks::DropArpToHost
- Inherits:
-
Dcmgr::VNet::Task
- Object
- Dcmgr::VNet::Task
- Dcmgr::VNet::Tasks::DropArpToHost
- 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
-
#enable_logging ⇒ Object
readonly
Returns the value of attribute enable_logging.
-
#log_prefix ⇒ Object
readonly
Returns the value of attribute log_prefix.
Attributes inherited from Dcmgr::VNet::Task
Instance Method Summary collapse
-
#initialize ⇒ DropArpToHost
constructor
A new instance of DropArpToHost.
Constructor Details
#initialize ⇒ DropArpToHost
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_logging ⇒ Object (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_prefix ⇒ Object (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 |