Open toros11 opened 8 years ago
https://github.com/axsh/openvnet/blob/develop/vnet/lib/vnet/node_api/interface.rb
case options[:ingress_filtering_enabled]
when "true"
dispatch_event(INTERFACE_ENABLED_FILTERING, id: interface.id)
when "false"
dispatch_event(INTERFACE_DISABLED_FILTERING, id: interface.id)
end
case options[:enable_filtering]
when "true"
dispatch_event(INTERFACE_ENABLED_FILTERING2, id: interface.id)
when "false"
dispatch_event(INTERFACE_DISABLED_FILTERING2, id: interface.id)
end
There seems to be a problem with these case statements, even though the flag is set there neither true
or false
generates a response.
In addition to the above, the current flows does not get updated when filter events are dispatched
https://github.com/axsh/openvnet/blob/develop/vnet/lib/vnet/core/interfaces/if_base.rb
def flows_for_interface_ipv4(flows, mac_info, ipv4_info)
cookie = self.cookie_for_ip_lease(ipv4_info[:cookie_id])
#
# new Classifier
#
if @enabled_filtering
flows << flow_create(table: TABLE_INTERFACE_EGRESS_CLASSIFIER,
goto_table: TABLE_INTERFACE_EGRESS_FILTER,
priority: 90,
match_interface: @id,
cookie: self.cookie
)
else
flows << flow_create(table: TABLE_INTERFACE_EGRESS_CLASSIFIER,
goto_table: TABLE_INTERFACE_EGRESS_VALIDATE,
priority: 90,
match_interface: @id,
cookie: self.cookie
)
end
When updating the filtering flags there is an issue with the options sent causing INTERFACE_DISABLED_FILTERING(2) to not always be dispatched.