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>
Tue, 19 Apr 2011 18:55:19 +0000 (11:55 -0700)
commit0721c0739fb73e1ab2f0446e896deccc0bb8d92a
tree1f4d6bdaed0e6910e61aa96ec6ecfa2add42452d
parente2bd05933f2c813e1cce42b8fe0db6230dffb13c
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