]> git.ipfire.org Git - thirdparty/libvirt.git/commit
util: set missing data length in virSocketAddrPrefixToNetmask()
authorLaine Stump <laine@laine.org>
Mon, 18 Feb 2019 21:33:57 +0000 (16:33 -0500)
committerLaine Stump <laine@laine.org>
Thu, 21 Feb 2019 17:59:09 +0000 (12:59 -0500)
commitabb293a56f449c7079876fa0622029400bec2eaf
treeb3e8edb099cd66b72a0dc798d64cea4e6a81caf9
parentc900474e6af5fef598671c7c3da47258ee107a59
util: set missing data length in virSocketAddrPrefixToNetmask()

This fixes a bug that has been present since the original version of
the function was pushed in commit 1ab80f3 on Nov. 26 2010 (by me). The
virSocketAddr::len was not being set.

Apparently until now we were always calling
virSocketAddrPrefixToNetmask with virSocketAddr object that was
already (coincidentally) initialized for the proper address family,
but the bug became apparent when trying to use it to fill in an
otherwise uninitialized object.

Signed-off-by: Laine Stump <laine@laine.org>
Reviewed-by: John Ferlan <jferlan@redhat.com>
src/util/virsocketaddr.c