]> git.proxmox.com Git - mirror_ovs.git/commit - ofproto/ofproto.c
ofproto: fix the bug of bucket counter is not updated
authorLi Wei <liwei.solomon@gmail.com>
Wed, 20 Mar 2019 12:16:18 +0000 (20:16 +0800)
committerBen Pfaff <blp@ovn.org>
Mon, 25 Mar 2019 20:32:22 +0000 (13:32 -0700)
commit304c8075c24d401e9497922d8c5438c48d0b90d7
tree86948b7744a50fd39473c55f8a006ef3d1e1633a
parent170ef7265a36b3716b1bdc6fd067e9dd7f38a133
ofproto: fix the bug of bucket counter is not updated

After inserting/removing a bucket, we don't update the bucket counter.
When we call ovs-ofctl dump-group-stats br-int, a panic happened.

Reproduce steps:
1. ovs-ofctl -O OpenFlow15 add-group br-int "group_id=1, type=select, selection_method=hash bucket=bucket_id=1,weight:100,actions=output:1"
2. ovs-ofctl insert-buckets br-int "group_id=1, command_bucket_id=last, bucket=bucket_id=7,weight:800,actions=output:1"
3. ovs-ofctl dump-group-stats br-int

gdb) bt
at ../sysdeps/posix/libc_fatal.c:175
ar_ptr=<optimized out>) at malloc.c:5049
group_id=<optimized out>, cb=cb@entry=0x55cab8fd6cd0 <append_group_stats>) at ofproto/ofproto.c:6790

Signed-off-by: solomon <liwei.solomon@gmail.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
ofproto/ofproto.c
tests/ofproto.at