From d13803eb5a5af97a5b35193ce5887c4e4cb10e8a Mon Sep 17 00:00:00 2001 From: Ethan Jackson Date: Sun, 2 Jan 2011 12:52:11 -0800 Subject: [PATCH] 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. --- lib/ofp-parse.c | 2 ++ 1 file changed, 2 insertions(+) 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++; } } -- 2.30.2