Flow request containing an invalid action should be rejected 72/9172/1
authormaquresh <maquresh@cisco.com>
Fri, 18 Jul 2014 23:17:46 +0000 (16:17 -0700)
committermaquresh <maquresh@cisco.com>
Fri, 18 Jul 2014 23:17:46 +0000 (16:17 -0700)
commit092e2daa707655119a695a9c30d6f50824b79570
treeed466f951cfc3a910b842467aa2ea62987134b83
parent605e93859db80e6d0858a26046ee446f9fb967d6
Flow request containing an invalid action should be rejected

When ODL Controller receives a request to install a flow, it is processed
by FlowConfig class in forwardingrulesmanager bundle. There is method
named "validate" which validates the matches and actions specified in
the flow request. If this method encounters an invalid action, it simply
ignores it and moves to the next action. The result of this behavior is that
if flow request contains only one action and it happens to be invalid,
the FlowMod request will be sent to the switch without any action. An
OVS conforming switch will install this flow and set the action to drop.
However, ideally Controller should reject this request (or any request
containing an invalid action).

Few invalid unit test cases were also escaping due to this error, which
have been corrected.

Change-Id: I4df3226d6ec9c663476cae1991c194bc36cb2f99
Signed-off-by: maquresh <maquresh@cisco.com>
opendaylight/forwardingrulesmanager/api/src/main/java/org/opendaylight/controller/forwardingrulesmanager/FlowConfig.java
opendaylight/forwardingrulesmanager/api/src/test/java/org/opendaylight/controller/forwardingrulesmanager/frmTest.java