ofp-util: Properly handle "tun_id"s in tun_id_from_cookie flows.
authorBen Pfaff <blp@nicira.com>
Mon, 18 Apr 2011 17:11:43 +0000 (10:11 -0700)
committerBen Pfaff <blp@nicira.com>
Fri, 29 Apr 2011 21:31:59 +0000 (14:31 -0700)
commit43c5c3bcb0de449f2489cb826020752f1162c0be
treec257ceca78ba6378e6fc288e066349697ce2a261
parent2556693b6dfa48afdd39c891350fb6e0a8013374
ofp-util: Properly handle "tun_id"s in tun_id_from_cookie flows.

Just setting the tun_id field isn't enough--it's also necessary to set
the tun_id_mask.  Otherwise the call to cls_rule_zero_wildcarded_fields()
at the end of ofputil_cls_rule_from_match() will zero out the tun_id again.

This was broken by commit 8368c090cab "Implement arbitrary bitwise masks
for tun_id field" back in January.  (This makes me wonder whether we can
drop support for tun_id_from_cookie now.)

Reported-by: Dan Wendlandt <dan@nicira.com>
lib/ofp-util.c
tests/ofproto.at