From: Ethan Jackson Date: Sun, 2 Jan 2011 20:52:11 +0000 (-0800) Subject: ofp-parse: ofp-parse fails to properly validate DROP. X-Git-Tag: v1.1.0~542 X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=d13803eb5a5af97a5b35193ce5887c4e4cb10e8a;p=sliver-openvswitch.git ofp-parse: ofp-parse fails to properly validate DROP. The str_to_action function of ofp-parse was not properly incrementing it's actions counter. Thus it did not enforce the requirement that DROP actions not be preceded by other actions. --- diff --git a/lib/ofp-parse.c b/lib/ofp-parse.c index e30c8a91a..f8464b99d 100644 --- a/lib/ofp-parse.c +++ b/lib/ofp-parse.c @@ -200,6 +200,7 @@ str_to_action(char *str, struct ofpbuf *b) char *pos; pos = str; + n_actions = 0; for (;;) { char *act, *arg; size_t actlen; @@ -414,6 +415,7 @@ str_to_action(char *str, struct ofpbuf *b) } else { ovs_fatal(0, "Unknown action: %s", act); } + n_actions++; } }