Message ID | 20190430232728.31093-3-blp@ovn.org |
---|---|
State | Accepted |
Commit | dca97ce8eeaef7ff11f601a85137e312261b4dbc |
Headers | show |
Series | [ovs-dev,01/10] ofp-actions: Make encap action really require OF1.3+. | expand |
diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index c2cef769e839..405b7c7eff81 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -640,6 +640,12 @@ parse_truncate_subfield(const char *arg_, if (err) { return err; } + + if (output_trunc->max_len < ETH_HEADER_LEN) { + return xasprintf("max_len %"PRIu32" is less than the minimum " + "value %d", + output_trunc->max_len, ETH_HEADER_LEN); + } } else { return xasprintf("invalid key '%s' in output_trunc argument", key);
Otherwise, specifying something like output(port=1,max_len=5) would parse OK and then cause a failure when it was received by the switch. Signed-off-by: Ben Pfaff <blp@ovn.org> --- lib/ofp-actions.c | 6 ++++++ 1 file changed, 6 insertions(+)