So far, didn't checked if action structure of variable length has multiple length of 8 bytes.
Signed-off-by: Isaku Yamahata <yamah...@valinux.co.jp> --- lib/ofp-actions.c | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/lib/ofp-actions.c b/lib/ofp-actions.c index 0874cc4..d274895 100644 --- a/lib/ofp-actions.c +++ b/lib/ofp-actions.c @@ -459,7 +459,14 @@ ofpacts_from_openflow(const union ofp_action *in, size_t n_in, size_t left; ACTION_FOR_EACH (a, left, in, n_in) { - enum ofperr error = ofpact_from_openflow(a, out); + enum ofperr error; + if (a->header.len % 8 != 0) { + VLOG_WARN_RL(&rl, "OpenFlow message actions length %u is not a " + "multiple of 8", a->header.len); + return OFPERR_OFPBRC_BAD_LEN; + } + + error = ofpact_from_openflow(a, out); if (error) { log_bad_action(in, n_in, a - in, error); return error; -- 1.7.1.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev