[libvirt] [PATCH] lib: Document limitation of virDomainInterfaceAddresses

Michal Privoznik posted 1 patch 5 years, 10 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/d7103519a5b26ac44905d2af8875c362e0f5276c.1528803167.git.mprivozn@redhat.com
Test syntax-check passed
src/libvirt-domain.c | 4 ++++
1 file changed, 4 insertions(+)
[libvirt] [PATCH] lib: Document limitation of virDomainInterfaceAddresses
Posted by Michal Privoznik 5 years, 10 months ago
https://bugzilla.redhat.com/show_bug.cgi?id=1588336

This API takes @source argument which tells it where to get
domain IP addresses from. However, not all sources are capable of
providing all the information we report, for instance ARP table
has no notion of IP address prefixes. Document this limitation.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
---
 src/libvirt-domain.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/libvirt-domain.c b/src/libvirt-domain.c
index dcfc7d4c57..4a899f31c8 100644
--- a/src/libvirt-domain.c
+++ b/src/libvirt-domain.c
@@ -11780,6 +11780,10 @@ virDomainFSInfoFree(virDomainFSInfoPtr info)
  * be unreachable. Depending on the route table config of the
  * guest, the returned mac address may be duplicated.
  *
+ * Note that for some @source values some pieces of returned @ifaces
+ * might be unset (e.g. VIR_DOMAIN_INTERFACE_ADDRESSES_SRC_ARP does not
+ * set IP address prefix as ARP table does not have any notion of that).
+ *
  * @ifaces->name and @ifaces->hwaddr are never NULL.
  *
  * The caller *must* free @ifaces when no longer needed. Usual use case
-- 
2.16.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH] lib: Document limitation of virDomainInterfaceAddresses
Posted by Laine Stump 5 years, 10 months ago
On 06/12/2018 07:32 AM, Michal Privoznik wrote:
> https://bugzilla.redhat.com/show_bug.cgi?id=1588336
>
> This API takes @source argument which tells it where to get
> domain IP addresses from. However, not all sources are capable of
> providing all the information we report, for instance ARP table
> has no notion of IP address prefixes. Document this limitation.
>
> Signed-off-by: Michal Privoznik <mprivozn@redhat.com>

Reviewed-by: Laine Stump <laine@laine.org>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list