ofproto: Correctly reject duplicate bucket ID for OFPGC_INSERT_BUCKET.
authorBen Pfaff <blp@ovn.org>
Wed, 25 Nov 2015 16:15:04 +0000 (08:15 -0800)
committerBen Pfaff <blp@ovn.org>
Wed, 25 Nov 2015 16:15:04 +0000 (08:15 -0800)
commit23a3123832b8a9718ac50010c261b76749a06c81
treea8d584ba5706efd4d2181e4a5fc07be978bb2c2e
parentefee3309ff13dc1adf212da11a8919b60b249c7c
ofproto: Correctly reject duplicate bucket ID for OFPGC_INSERT_BUCKET.

Otherwise duplicate bucket IDs cause linked list loops and other nastiness
because the ofputil_bucket_find() in the OFPG15_BUCKET_LAST case later in
copy_buckets_for_insert_bucket() will find the new bucket instead of the
old one and the list_splice() call becomes nonsensical.

Reported-by: Ray Li <rayli1107@gmail.com>
Reported-at: http://openvswitch.org/pipermail/discuss/2015-September/018731.html
Signed-off-by: Ben Pfaff <blp@ovn.org>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
AUTHORS
ofproto/ofproto.c
tests/ofproto.at