]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
common/pick_address: wrong prefix_len in pick_iface()
authorGu Zhongyan <guzhongyan@360.cn>
Fri, 26 Jan 2018 08:19:50 +0000 (16:19 +0800)
committerGu Zhongyan <guzhongyan@360.cn>
Tue, 30 Jan 2018 10:37:34 +0000 (18:37 +0800)
commitb0d8043a72af22648c058382c46a132264736aaa
tree91f4cdbd7be45f16cdd433f881b52f51994a0c88
parentc641b205a828419b9585803353919b87b7d68c4d
common/pick_address: wrong prefix_len in pick_iface()
With prefix_len initialized as zero, mask in netmask_ipv4/6()
will always be zero, so find_ip_in_subnet() always return the
first interface.
Set prefix_len to the right value to fetch the right interface.

Signed-off-by: Gu Zhongyan guzhongyan@360.cn
Signed-off-by: yupeng chen chenyupeng-it@360.cn
src/common/pick_address.cc