From nobody Fri Apr 26 07:15:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 154705580888627.83303713380792; Wed, 9 Jan 2019 09:43:28 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8DE15D792C; Wed, 9 Jan 2019 17:43:26 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31DBD600C9; Wed, 9 Jan 2019 17:43:26 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 718FA1808855; Wed, 9 Jan 2019 17:43:25 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x09HhOOZ018361 for ; Wed, 9 Jan 2019 12:43:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id 33F4BBA60; Wed, 9 Jan 2019 17:43:24 +0000 (UTC) Received: from vhost2.laine.org (ovpn-117-126.phx2.redhat.com [10.3.117.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id E5B539F7F for ; Wed, 9 Jan 2019 17:43:23 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 9 Jan 2019 12:43:12 -0500 Message-Id: <20190109174315.9703-2-laine@laine.org> In-Reply-To: <20190109174315.9703-1-laine@laine.org> References: <20190109174315.9703-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 1/4] util: remove const specifier from nlmsghdr arg to virNetlinkDumpCallback() X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Wed, 09 Jan 2019 17:43:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This is problematic if a callback function wants to send the nlmsghdr to a library function that has no "const" in its prototype (e.g. nlmsg_find_attr()) Signed-off-by: Laine Stump Reviewed-by: Erik Skultety --- src/util/virnetdevip.c | 2 +- src/util/virnetlink.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 9d308e440a..4c869739ee 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -506,7 +506,7 @@ struct virNetDevIPCheckIPv6ForwardingData { }; =20 static int -virNetDevIPCheckIPv6ForwardingCallback(const struct nlmsghdr *resp, +virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp, void *opaque) { struct rtmsg *rtmsg =3D NLMSG_DATA(resp); diff --git a/src/util/virnetlink.h b/src/util/virnetlink.h index debbd60f80..37442be44c 100644 --- a/src/util/virnetlink.h +++ b/src/util/virnetlink.h @@ -79,7 +79,7 @@ int virNetlinkCommand(struct nl_msg *nl_msg, uint32_t src_pid, uint32_t dst_pid, unsigned int protocol, unsigned int groups); =20 -typedef int (*virNetlinkDumpCallback)(const struct nlmsghdr *resp, +typedef int (*virNetlinkDumpCallback)(struct nlmsghdr *resp, void *data); =20 int virNetlinkDumpCommand(struct nl_msg *nl_msg, --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 26 07:15:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547055816419339.12513568739485; Wed, 9 Jan 2019 09:43:36 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0E99B7AEA8; Wed, 9 Jan 2019 17:43:34 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id CA18A5EDE0; Wed, 9 Jan 2019 17:43:33 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 69BD13F604; Wed, 9 Jan 2019 17:43:33 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x09HhOQn018367 for ; Wed, 9 Jan 2019 12:43:24 -0500 Received: by smtp.corp.redhat.com (Postfix) id A19139F74; Wed, 9 Jan 2019 17:43:24 +0000 (UTC) Received: from vhost2.laine.org (ovpn-117-126.phx2.redhat.com [10.3.117.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E6B967146 for ; Wed, 9 Jan 2019 17:43:24 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 9 Jan 2019 12:43:13 -0500 Message-Id: <20190109174315.9703-3-laine@laine.org> In-Reply-To: <20190109174315.9703-1-laine@laine.org> References: <20190109174315.9703-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/4] util: add a function to insert new interfaces to IPv6CheckForwarding list X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Wed, 09 Jan 2019 17:43:34 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This same operation needs to be done in multiple places, so move the inline code into a separate function. Signed-off-by: Laine Stump Reviewed-by: Erik Skultety --- src/util/virnetdevip.c | 29 ++++++++++++++++++++--------- 1 file changed, 20 insertions(+), 9 deletions(-) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 4c869739ee..72048e4b45 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -505,6 +505,25 @@ struct virNetDevIPCheckIPv6ForwardingData { size_t ndevices; }; =20 + +static int +virNetDevIPCheckIPv6ForwardingAddIF(struct virNetDevIPCheckIPv6ForwardingD= ata *data, + char **ifname) +{ + size_t i; + + /* add ifname to the array if it's not already there + * (ifname is char** so VIR_APPEND_ELEMENT() will move the + * original pointer out of the way and avoid having it freed) + */ + for (i =3D 0; i < data->ndevices; i++) { + if (STREQ(data->devices[i], *ifname)) + return 0; + } + return VIR_APPEND_ELEMENT(data->devices, data->ndevices, *ifname); +} + + static int virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr *resp, void *opaque) @@ -515,8 +534,6 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr = *resp, struct virNetDevIPCheckIPv6ForwardingData *data =3D opaque; int len =3D RTM_PAYLOAD(resp); int oif =3D -1; - size_t i; - bool hasDevice; VIR_AUTOFREE(char *) ifname =3D NULL; =20 /* Ignore messages other than route ones */ @@ -553,13 +570,7 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr= *resp, accept_ra =3D virNetDevIPGetAcceptRA(ifname); VIR_DEBUG("Checking route for device %s, accept_ra: %d", ifname, accep= t_ra); =20 - hasDevice =3D false; - for (i =3D 0; i < data->ndevices && !hasDevice; i++) { - if (STREQ(data->devices[i], ifname)) - hasDevice =3D true; - } - if (accept_ra !=3D 2 && !hasDevice && - VIR_APPEND_ELEMENT(data->devices, data->ndevices, ifname) < 0) + if (accept_ra !=3D 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifn= ame) < 0) return -1; =20 return 0; --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 26 07:15:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547055820990914.5267245644543; Wed, 9 Jan 2019 09:43:40 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BF15B89AEA; Wed, 9 Jan 2019 17:43:38 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 83AE410A1853; Wed, 9 Jan 2019 17:43:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 254693F605; Wed, 9 Jan 2019 17:43:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x09HhPFk018379 for ; Wed, 9 Jan 2019 12:43:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1C6159F74; Wed, 9 Jan 2019 17:43:25 +0000 (UTC) Received: from vhost2.laine.org (ovpn-117-126.phx2.redhat.com [10.3.117.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id CC28D9F7F for ; Wed, 9 Jan 2019 17:43:24 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 9 Jan 2019 12:43:14 -0500 Message-Id: <20190109174315.9703-4-laine@laine.org> In-Reply-To: <20190109174315.9703-1-laine@laine.org> References: <20190109174315.9703-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 3/4] util: use nlmsg_find_attr() instead of an open-coded loop X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 09 Jan 2019 17:43:39 +0000 (UTC) Content-Type: text/plain; charset="utf-8" This is about the same number of code lines, but is simpler, and more consistent with what will be added to check another attribute in a coming patch. As a side effect, it Resolves: https://bugzilla.redhat.com/1583131 Signed-off-by: Laine Stump Reviewed-by: Erik Skultety --- src/util/virnetdevip.c | 53 ++++++++++++++++++------------------------ 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index 72048e4b45..c032ecacfc 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -529,49 +529,42 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghd= r *resp, void *opaque) { struct rtmsg *rtmsg =3D NLMSG_DATA(resp); - int accept_ra =3D -1; - struct rtattr *rta; struct virNetDevIPCheckIPv6ForwardingData *data =3D opaque; - int len =3D RTM_PAYLOAD(resp); - int oif =3D -1; + struct rtattr *rta_attr; + int accept_ra =3D -1; + int ifindex =3D -1; VIR_AUTOFREE(char *) ifname =3D NULL; =20 /* Ignore messages other than route ones */ if (resp->nlmsg_type !=3D RTM_NEWROUTE) return 0; =20 - /* Extract a device ID attribute */ - VIR_WARNINGS_NO_CAST_ALIGN - for (rta =3D RTM_RTA(rtmsg); RTA_OK(rta, len); rta =3D RTA_NEXT(rta, l= en)) { - VIR_WARNINGS_RESET - if (rta->rta_type =3D=3D RTA_OIF) { - oif =3D *(int *)RTA_DATA(rta); - - /* Should never happen: netlink message would be broken */ - if (ifname) { - VIR_AUTOFREE(char *) ifname2 =3D virNetDevGetName(oif); - VIR_WARN("Single route has unexpected 2nd interface " - "- '%s' and '%s'", ifname, ifname2); - break; - } - - if (!(ifname =3D virNetDevGetName(oif))) - return -1; - } - } - /* No need to do anything else for non RA routes */ if (rtmsg->rtm_protocol !=3D RTPROT_RA) return 0; =20 - data->hasRARoutes =3D true; + rta_attr =3D (struct rtattr *)nlmsg_find_attr(resp, sizeof(struct rtms= g), RTA_OIF); + if (rta_attr) { + /* This is a single path route, with interface used to reach + * nexthop in the RTA_OIF attribute. + */ + ifindex =3D *(int *)RTA_DATA(rta_attr); + ifname =3D virNetDevGetName(ifindex); =20 - /* Check the accept_ra value for the interface */ - accept_ra =3D virNetDevIPGetAcceptRA(ifname); - VIR_DEBUG("Checking route for device %s, accept_ra: %d", ifname, accep= t_ra); + if (ifname) + accept_ra =3D virNetDevIPGetAcceptRA(ifname); =20 - if (accept_ra !=3D 2 && virNetDevIPCheckIPv6ForwardingAddIF(data, &ifn= ame) < 0) - return -1; + VIR_DEBUG("Checking route for device %s (%d), accept_ra: %d", + ifname, ifindex, accept_ra); + + if (!ifname || + (accept_ra !=3D 2 && virNetDevIPCheckIPv6ForwardingAddIF(data,= &ifname) < 0)) { + return -1; + } + + data->hasRARoutes =3D true; + return 0; + } =20 return 0; } --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 26 07:15:41 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1547055810470644.0685965606967; Wed, 9 Jan 2019 09:43:30 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 6400674867; Wed, 9 Jan 2019 17:43:28 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2F6CB600C9; Wed, 9 Jan 2019 17:43:28 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D64D81843669; Wed, 9 Jan 2019 17:43:27 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x09HhPf9018386 for ; Wed, 9 Jan 2019 12:43:25 -0500 Received: by smtp.corp.redhat.com (Postfix) id 913559F7F; Wed, 9 Jan 2019 17:43:25 +0000 (UTC) Received: from vhost2.laine.org (ovpn-117-126.phx2.redhat.com [10.3.117.126]) by smtp.corp.redhat.com (Postfix) with ESMTP id 476F29F74 for ; Wed, 9 Jan 2019 17:43:25 +0000 (UTC) From: Laine Stump To: libvir-list@redhat.com Date: Wed, 9 Jan 2019 12:43:15 -0500 Message-Id: <20190109174315.9703-5-laine@laine.org> In-Reply-To: <20190109174315.9703-1-laine@laine.org> References: <20190109174315.9703-1-laine@laine.org> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 4/4] util: check accept_ra for all nexthop interfaces of multipath routes X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.26]); Wed, 09 Jan 2019 17:43:29 +0000 (UTC) Content-Type: text/plain; charset="utf-8" When checking the setting of accept_ra, we have assumed that all routes have a single nexthop, so the interface of the route would be in the RTA_OIF attribute of the netlink RTM_NEWROUTE message. But multipath routes don't have an RTA_OIF; instead, they have an RTA_MULTIPATH attribute, which is an array of rtnexthop, with each rtnexthop having an interface. This patch adds a loop to look at the setting of accept_ra of the interface for every rtnexthop in the array. Signed-off-by: Laine Stump Reviewed-by: Erik Skultety --- src/util/virnetdevip.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/src/util/virnetdevip.c b/src/util/virnetdevip.c index c032ecacfc..e0965bcc1d 100644 --- a/src/util/virnetdevip.c +++ b/src/util/virnetdevip.c @@ -566,6 +566,43 @@ virNetDevIPCheckIPv6ForwardingCallback(struct nlmsghdr= *resp, return 0; } =20 + /* if no RTA_OIF was found, see if this is a multipath route (one + * which has an array of nexthops, each with its own interface) + */ + + rta_attr =3D (struct rtattr *)nlmsg_find_attr(resp, sizeof(struct rtms= g), RTA_MULTIPATH); + if (rta_attr) { + /* The data of the attribute is an array of rtnexthop */ + struct rtnexthop *nh =3D RTA_DATA(rta_attr); + size_t len =3D RTA_PAYLOAD(rta_attr); + + /* validate the attribute array length */ + len =3D MIN(len, ((char *)resp + NLMSG_PAYLOAD(resp, 0) - (char *)= rta_attr)); + + while (len >=3D sizeof(*nh) && len >=3D nh->rtnh_len) { + /* check accept_ra for the interface of each nexthop */ + + ifname =3D virNetDevGetName(nh->rtnh_ifindex); + + if (ifname) + accept_ra =3D virNetDevIPGetAcceptRA(ifname); + + VIR_DEBUG("Checking multipath route nexthop device %s (%d), ac= cept_ra: %d", + ifname, nh->rtnh_ifindex, accept_ra); + + if (!ifname || + (accept_ra !=3D 2 && virNetDevIPCheckIPv6ForwardingAddIF(d= ata, &ifname) < 0)) { + return -1; + } + + VIR_FREE(ifname); /* in case it wasn't added to the array */ + data->hasRARoutes =3D true; + + len -=3D NLMSG_ALIGN(nh->rtnh_len); + nh =3D RTNH_NEXT(nh); + } + } + return 0; } =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list