[libvirt] [PATCH] BSD: implement virNetDev(Set|Clear)IPv4Address

Roman Bogorodskiy bogorodskiy at gmail.com
Tue Jun 25 12:52:41 UTC 2013


  Laine Stump wrote:

> There is a potential problem here. When this function was renamed from
> brAddInetAddress(), it was incorrectly given the "IPv4" moniker. In
> fact, it is used to add either IPv4 or IPv6 addresses to the interface.
> In order for this to work correctly, you'll need to check the family of
> the virSocketAddr and use either "inet" or "inet6" accordingly.
> 
> 
> (and this function should really be renamed to virNetDevAddIPAddress,
> since it is v4 or v6, and multiple addresses can be added.
> virNetDevClearIPv4Address should similarly be changed to
> virNetDevDelIPAddress (or maybe they should be
> virNetDevIPAddress(Add|Del) ) (That's a separate issue, though).

Thanks for suggestion, I have added a check.

BTW, doc string for virNetDevSetIPv4Address() references brDelInetAddress() which
doesn't exist (I guess it's a leftover after rename as well).

Roman Bogorodskiy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20130625/550605df/attachment-0001.sig>


More information about the libvir-list mailing list