]> git.proxmox.com Git - mirror_ovs.git/commit
ofp-util: Mask config value as intended in ofputil_decode_port_mod().
authorBen Pfaff <blp@ovn.org>
Sat, 27 May 2017 03:36:17 +0000 (20:36 -0700)
committerBen Pfaff <blp@ovn.org>
Thu, 1 Jun 2017 23:43:21 +0000 (16:43 -0700)
commitd713501835575e0427cceba6c14ac6eede852e1a
tree62b56e5e8bf7ba2008d8a6544a4346249ce2aa6d
parentaa5c02160730e9a2554c5251cf4231c6db905dee
ofp-util: Mask config value as intended in ofputil_decode_port_mod().

The code in ofputil_decode_port_mod() was originally meant to mask
the returned 'config' value against 'mask'.  That is, only bits that are
marked in 'mask' as to be modified can be set to 1-bits in the returned
'config' value; it doesn't really entirely make sense otherwise.  The
actual code to do this was dead, though.  This fixes that problem.

In a quick skim of callers, I wasn't able to see an actual user-visible
bug that this fixes.

Found by Coverity.

Reported-at: https://scan3.coverity.com/reports.htm#v16889/p10449/fileInstanceId=14762682&defectInstanceId=4304822&mergedDefectId=180422
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Justin Pettit <jpettit@ovn.org>
lib/ofp-util.c