Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable filtering events not dispatched properly #430

Open
toros11 opened this issue Dec 21, 2015 · 2 comments
Open

enable filtering events not dispatched properly #430

toros11 opened this issue Dec 21, 2015 · 2 comments

Comments

@toros11
Copy link
Member

toros11 commented Dec 21, 2015

When updating the filtering flags there is an issue with the options sent causing INTERFACE_DISABLED_FILTERING(2) to not always be dispatched.

@toros11
Copy link
Member Author

toros11 commented Jan 14, 2016

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.

@toros11
Copy link
Member Author

toros11 commented May 10, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants