Class: Dcmgr::VNet::Tasks::AcceptARPFromGateway
- Inherits:
-
Dcmgr::VNet::Task
- Object
- Dcmgr::VNet::Task
- Dcmgr::VNet::Tasks::AcceptARPFromGateway
- Includes:
- Netfilter
- Defined in:
- lib/dcmgr/vnet/tasks/accept_arp_from_gateway.rb
Instance Attribute Summary collapse
-
#gw_ip ⇒ Object
Returns the value of attribute gw_ip.
Attributes inherited from Dcmgr::VNet::Task
Instance Method Summary collapse
-
#initialize(gw_ip, enable_logging = false, log_prefix = nil) ⇒ AcceptARPFromGateway
constructor
A new instance of AcceptARPFromGateway.
Constructor Details
#initialize(gw_ip, enable_logging = false, log_prefix = nil) ⇒ AcceptARPFromGateway
Returns a new instance of AcceptARPFromGateway.
11 12 13 14 15 16 |
# File 'lib/dcmgr/vnet/tasks/accept_arp_from_gateway.rb', line 11 def initialize(gw_ip,enable_logging = false,log_prefix = nil) super() self.gw_ip = gw_ip # Allow broadcast from the gateway self.rules << EbtablesRule.new(:filter,:forward,:arp,:incoming,"--protocol arp --arp-ip-src=#{self.gw_ip} #{EbtablesRule.log_arp(log_prefix) if enable_logging} -j ACCEPT") end |
Instance Attribute Details
#gw_ip ⇒ Object
Returns the value of attribute gw_ip.
9 10 11 |
# File 'lib/dcmgr/vnet/tasks/accept_arp_from_gateway.rb', line 9 def gw_ip @gw_ip end |