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-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d13803eb5a5af97a5b35193ce5887c4e4cb10e8a;p=openvswitch 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 e30c8a91..f8464b99 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++; } }