From nobody Fri Apr 26 11:45:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549545322673859.2806377527601; Thu, 7 Feb 2019 05:15:22 -0800 (PST) Received: from localhost ([127.0.0.1]:39835 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjWP-00042J-Kf for importer@patchew.org; Thu, 07 Feb 2019 08:15:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47263) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjV1-00035P-TX for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:53 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grjV0-0006W3-8G for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:51 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:39953) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grjUx-0006NC-Jh for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:48 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MOiLp-1gTKa81Dbz-00QEo9; Thu, 07 Feb 2019 14:13:27 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 14:13:14 +0100 Message-Id: <20190207131316.2957-2-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207131316.2957-1-laurent@vivier.eu> References: <20190207131316.2957-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:z1eJG/QPRllngUqpG7+RRm/tE756n9xSTh6dj8/pROw1vMaNPAh umD57KndAFR+l1ufOdK2M6xaY/D86FgBHsN0Kw1jtdcLM4RkzD8jpjqpEbmYmorqTIk8SqL BzfLP8Vqo+Hm5Wbyhffy+SwEDOefPv/typRy8OL8oiHEKZUIoc5uSxLC/zUYGTxGHSsv+bS 0wzrFWzClEcnG7457felw== X-UI-Out-Filterresults: notjunk:1;V03:K0:guRrH92YyYU=:EFnMWg11eFAj0xxoYmao+O yTzToKzs+TWFhbD+DrsVdSzfql6rOM8L6vCo34+/z8RHylLWIkHPG7qdCH95CJebeVGRuSv7S 59Y8T2wyhYj8Sl+2z5yRuxzUTBMUhRnf6uVPuk5eYb0WoFuYznMtIfQVyz3RTOPcMvzPwgxGz aB7TjlvSbHG1vHh85Hg9g+yeGBpME0C65RyMfnsYqau/cEeRAuc5mq2dyOXOAUhXK9AiKL4yK Ys6aPs4gnJjvnviLoAw677TAzMQkh3kbQdmrKLDHGu9SSGUS6rc9+YQPhXG+qeYfwJP3afHYp rQY88wyLBdDsVhwYh52l5hjXKn9Cu8ARuUi4T4Q1wYnvd8UCZoD0rmeL/v/NV74S2KR2GlZyl 27bYtzIlplWDZtfHfQlXiPSs8l67ZK2eIyTUotkq+4cGVwp3RBW+p6+W690TBPaGbc1CuuWAh MLDDh0S6DSqlmLAEZ8vEzZlzTrV8gc0c5KJB4s9cZWJpa9XrR2Vt3LkXU5hrY2V+xe0fYWCPf yU1ml2A8OQIVbHLspESfZyiCKKZzsJ9Wo/WgqdFHiCtzNU2MPKjHwsKr1UtTSh2oFd6Rk+6jD sWBDIqQvPgja9DderZNkunOB+rTM+mH8spYK1xlelkdLTPJLOQP9ELSpZBeTDcxIyT3/oVd35 iMcTNM9XmXGs4kM79ut+etW0VDa0L4fPwQTWo4RzLk6Q4Nyu6zxVnoKk5C5Yh6bilkb6rAbWo pYGRDa4uGuDeJ0aSERZoiOPFUz6QOrHTDvoIQA== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.74 Subject: [Qemu-devel] [PULL v2 1/3] Fix linux-user crashes in ioctl(SIOCGIFCONF) when ifc_buf is NULL. X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kan Li , Laurent Vivier , Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" From: Kan Li Summary: This is to fix bug https://bugs.launchpad.net/qemu/+bug/1796754. It is valid for ifc_buf to be NULL according to http://man7.org/linux/man-pages/man7/netdevice.7.html. Signed-off-by: Kan Li Reviewed-by: Laurent Vivier Message-Id: <20181024201303.114-1-likan_999.student@sina.com> [lv: fix errors reported by checkpatch.pl] Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 56 ++++++++++++++++++++++++-------------------- 1 file changed, 31 insertions(+), 25 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bf076cbf8c..08acc4d860 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4187,28 +4187,33 @@ static abi_long do_ioctl_ifconf(const IOCTLEntry *i= e, uint8_t *buf_temp, unlock_user(argptr, arg, 0); =20 host_ifconf =3D (struct ifconf *)(unsigned long)buf_temp; - target_ifc_len =3D host_ifconf->ifc_len; target_ifc_buf =3D (abi_long)(unsigned long)host_ifconf->ifc_buf; - target_ifreq_size =3D thunk_type_size(ifreq_arg_type, 0); - nb_ifreq =3D target_ifc_len / target_ifreq_size; - host_ifc_len =3D nb_ifreq * sizeof(struct ifreq); =20 - outbufsz =3D sizeof(*host_ifconf) + host_ifc_len; - if (outbufsz > MAX_STRUCT_SIZE) { - /* We can't fit all the extents into the fixed size buffer. - * Allocate one that is large enough and use it instead. - */ - host_ifconf =3D malloc(outbufsz); - if (!host_ifconf) { - return -TARGET_ENOMEM; + if (target_ifc_buf !=3D 0) { + target_ifc_len =3D host_ifconf->ifc_len; + nb_ifreq =3D target_ifc_len / target_ifreq_size; + host_ifc_len =3D nb_ifreq * sizeof(struct ifreq); + + outbufsz =3D sizeof(*host_ifconf) + host_ifc_len; + if (outbufsz > MAX_STRUCT_SIZE) { + /* + * We can't fit all the extents into the fixed size buffer. + * Allocate one that is large enough and use it instead. + */ + host_ifconf =3D malloc(outbufsz); + if (!host_ifconf) { + return -TARGET_ENOMEM; + } + memcpy(host_ifconf, buf_temp, sizeof(*host_ifconf)); + free_buf =3D 1; } - memcpy(host_ifconf, buf_temp, sizeof(*host_ifconf)); - free_buf =3D 1; - } - host_ifc_buf =3D (char*)host_ifconf + sizeof(*host_ifconf); + host_ifc_buf =3D (char *)host_ifconf + sizeof(*host_ifconf); =20 - host_ifconf->ifc_len =3D host_ifc_len; + host_ifconf->ifc_len =3D host_ifc_len; + } else { + host_ifc_buf =3D NULL; + } host_ifconf->ifc_buf =3D host_ifc_buf; =20 ret =3D get_errno(safe_ioctl(fd, ie->host_cmd, host_ifconf)); @@ -4231,15 +4236,16 @@ static abi_long do_ioctl_ifconf(const IOCTLEntry *i= e, uint8_t *buf_temp, thunk_convert(argptr, host_ifconf, arg_type, THUNK_TARGET); unlock_user(argptr, arg, target_size); =20 - /* copy ifreq[] to target user */ - - argptr =3D lock_user(VERIFY_WRITE, target_ifc_buf, target_ifc_len,= 0); - for (i =3D 0; i < nb_ifreq ; i++) { - thunk_convert(argptr + i * target_ifreq_size, - host_ifc_buf + i * sizeof(struct ifreq), - ifreq_arg_type, THUNK_TARGET); + if (target_ifc_buf !=3D 0) { + /* copy ifreq[] to target user */ + argptr =3D lock_user(VERIFY_WRITE, target_ifc_buf, target_ifc_= len, 0); + for (i =3D 0; i < nb_ifreq ; i++) { + thunk_convert(argptr + i * target_ifreq_size, + host_ifc_buf + i * sizeof(struct ifreq), + ifreq_arg_type, THUNK_TARGET); + } + unlock_user(argptr, target_ifc_buf, target_ifc_len); } - unlock_user(argptr, target_ifc_buf, target_ifc_len); } =20 if (free_buf) { --=20 2.20.1 From nobody Fri Apr 26 11:45:20 2024 Delivered-To: importer@patchew.org Received-SPF: temperror (zoho.com: Error in retrieving data from DNS) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=temperror (zoho.com: Error in retrieving data from DNS) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549545510461762.8767258098741; Thu, 7 Feb 2019 05:18:30 -0800 (PST) Received: from localhost ([127.0.0.1]:39887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjZO-0006Bw-9Y for importer@patchew.org; Thu, 07 Feb 2019 08:18:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47240) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjV0-00033C-9G for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grjUx-0006Q7-Nk for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:49 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:58959) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grjUx-0006Fv-DL for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:47 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1M2wCg-1goQ6e0tPY-003MNC; Thu, 07 Feb 2019 14:13:28 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 14:13:15 +0100 Message-Id: <20190207131316.2957-3-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207131316.2957-1-laurent@vivier.eu> References: <20190207131316.2957-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:N5Q3q/WGm2DHhhdeJSHbXUifAe5fw+4xxMpSGceZ7QRQ4+K2Qul MojolsylzZSr3VGNzPI708+CvpUxhECb0zt0mkgkCBXd3KllJVwZny3pqB1QtFzPyGssGmy Awpx9b3R95tfNbTCLpHytonklz6mUbBs7qyY7GOxIonrCSaqRWyIfnkwdEAdXWdZkuiFE27 HQ+EB4loq7+8ewu9mBGkQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:T+Ik1Nlu6SM=:s5aoDS8NE8q3HY8HWptZk5 YhUdwJHDfrsLMlAR2BKmJFBotlddNMKXjV8u6vgl6Ez0YGy1CEqw3Z0gX6+Ddnuh1DV7PcFl1 VwH3duJeYU5vGQlHV39mjCgcVbcaqxRXmfJdQ023FMmxR/q7utX1khvyR2cR1i15xUYeVqaDs CAZAwhgYCi/pNvMCtDZrc7gd1xVP30x5ZjCbFB+va3YUz3dn+0AVrGjjnfn5JxJSEMMa2JbDw ljzUOuaZTGxO2TlShHN85JMWI/AcpKxt4Vs50PUGn955u7W2GgXTCmKWUXUTMUgtAPcqOEzMX H3xjCBF2AQRiDRjV+JaE0GVO3166ZolN7EEEnA5g4pdRd/RmC6+mrtuwDPshS9D5SX7bHxOgb ihC2JefiF7oSfT63NEDKsbvHfipCquThM9NSy5bpsnB2yFL0SqCA1RPAJbxpdoZOM9Ugd9AgQ 03RJg6VYOkKJlUPnFcYF+gvoK4XZdDgURq/8VRISx5LAOP9JLXdtpC2rjmgj9QPNbF3Lb0Pgn FwZRLbxB9Jw3nkUEP5ISD7gYRtJptwNnlGc6Gi1T7uaa6AKkSYFtfafhD4jh3hgai3UfYNkGH LeuVocinlTIkHm4CkdoAIHLurjxod2OWUd+lD5BYH92P5DfOS2TrdvCrvhpdoBUs6RafEkKF8 6uDVJVf1W/vlZw813gifzISfoSUW1NxwDBGWWuWc76yZ8aVQqHd85zYwjvkSRkFaxQqHD7FJ5 aEPmKUKIc03BAFEIbkMG6GI1wqvjXB9cCsgfR7O3lW2JTqI8PlL1LJshk9I= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL v2 2/3] linux-user: Check sscanf return value in open_net_route() X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Riku Voipio , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Laurent Vivier , Stefano Garzarella Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" From: Peter Maydell Coverity warns (CID 1390634) that open_net_route() is not checking the return value from sscanf(), which means that it might then use values that aren't initialized. Errors here should in general not happen since we're passing an assumed-good /proc/net/route from the host kernel, but if we do fail to parse a line then just skip it in the output we pass to the guest. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Stefano Garzarella Reviewed-by: Laurent Vivier Message-Id: <20190205174207.9278-1-peter.maydell@linaro.org> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 08acc4d860..5bbb72f3d5 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6768,9 +6768,15 @@ static int open_net_route(void *cpu_env, int fd) char iface[16]; uint32_t dest, gw, mask; unsigned int flags, refcnt, use, metric, mtu, window, irtt; - sscanf(line, "%s\t%08x\t%08x\t%04x\t%d\t%d\t%d\t%08x\t%d\t%u\t%u\n= ", - iface, &dest, &gw, &flags, &refcnt, &use, &metric, - &mask, &mtu, &window, &irtt); + int fields; + + fields =3D sscanf(line, + "%s\t%08x\t%08x\t%04x\t%d\t%d\t%d\t%08x\t%d\t%u\t%= u\n", + iface, &dest, &gw, &flags, &refcnt, &use, &metric, + &mask, &mtu, &window, &irtt); + if (fields !=3D 11) { + continue; + } dprintf(fd, "%s\t%08x\t%08x\t%04x\t%d\t%d\t%d\t%08x\t%d\t%u\t%u\n", iface, tswap32(dest), tswap32(gw), flags, refcnt, use, metric, tswap32(mask), mtu, window, irtt); --=20 2.20.1 From nobody Fri Apr 26 11:45:20 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 154954531501379.17007572997102; Thu, 7 Feb 2019 05:15:15 -0800 (PST) Received: from localhost ([127.0.0.1]:39833 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjWJ-0003wa-Nc for importer@patchew.org; Thu, 07 Feb 2019 08:15:11 -0500 Received: from eggs.gnu.org ([209.51.188.92]:47241) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grjV0-00033D-7A for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grjUx-0006QC-O0 for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:50 -0500 Received: from mout.kundenserver.de ([217.72.192.75]:45239) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grjUx-0006Du-Dw for qemu-devel@nongnu.org; Thu, 07 Feb 2019 08:13:47 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MxmBc-1h2ODW36is-00zIRY; Thu, 07 Feb 2019 14:13:28 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 14:13:16 +0100 Message-Id: <20190207131316.2957-4-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207131316.2957-1-laurent@vivier.eu> References: <20190207131316.2957-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:Bo5VWWfcuzV96BgXq2bmMSVFWIZqcbr6gT96R7qfpsT3Nx87Ztw VqVrkvwSDhkHoN4eheDPFYellZ+fsU+05ULs7euYqxK1YagSumge8o3PVaj38DtP6/v2gKm ZBJuOPujogHi8Fqg3edU0BYyDBp1cvikAvBx1MbHn/Iv9XwtmTO+QHQC/zX05v/tACPKzZC txlCl2Qo5KvWiO/P2PgDg== X-UI-Out-Filterresults: notjunk:1;V03:K0:vHo/SYMVM1U=:VbvE+wJTtvX2yEcvd5GHWQ OmX7L8Fmxwbl35R6V4PubZj7LYuJm/GpyZ6q3563fbcdqO7KhSgzsxdEjl9LPiygoLK4mOrtg ogzqVtYoQaD4wdcK6iyhaZEQmcZP2XSOYiVGmw2MC+sR95KU3J2P5WYi6G/LJSGM+s08jY5Ir 7arhsjYgUWlcZsnrQVoax2De2jFCszqrKe6ICIGHizX6fy8STnRosbgefNDF9Z4li5HXRammB BVMObmjm/CP8Vue6HTK0LwXqk3TmSsjaRNthi4Fa2z59hpHKaUNHA6joDXzngetMck2k+7meA phtQwAPQNF+LJoCXq0Op8oHnx16k4MvC+i3OfGtcqu+N29hss3QGe46L3Kxp1a95eNVcaRdeY BdAqxPNU/0XyXSmFld+gcv7Y7bhLQrf90HQUV7VCWRNHiyv0ST73C4iMDyks1ysFhBuYGfuc1 NafzzEYNYzgHxp7OcbHtLgja15lEppEedgZrZNsPDkokPLKK0GrdNfTn4iXzNoXkBJ+ivU4Wy X6JY3ilFIGi5U1gPH2Fn7jOm1OiqzEDw7rEZUmlzNxXk7WBbEiqqzctmcP5uu9MZmoyFKpL0z 4qx0+rSyZR2tEOfr6EaffPw98NFhrUjWeRmYJ6+tfzgGKmJ6i0KK/WPpVi9XEJuW/cofGrXEm 2196irYFUiEoDV+74NSb1VDrlIaW0y7z2Gz84efw2kBoyDojT5wrH5+ooMlFQtYTwUSjWWbfz GKqepRSzcQVT8TJ5pCs7RMFYT1UQ85X2oQv4Mg== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.75 Subject: [Qemu-devel] [PULL v2 3/3] linux-user: add new netlink types X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Riku Voipio , Laurent Vivier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Add QEMU_IFLA_MIN_MTU, QEMU_IFLA_MAX_MTU (from linux v4.19) QEMU_IFLA_BRPORT_ISOLATED (from linux v4.18) and QEMU_IFLA_BRPORT_BACKUP_PORT (from linux v4.19). These new types fix this error flow with sudo: ... Unknown host QEMU_IFLA type: 50 Unknown host QEMU_IFLA type: 51 Unknown QEMU_IFLA_BRPORT type 33 ... Signed-off-by: Laurent Vivier Message-Id: <20190206193211.6683-1-laurent@vivier.eu> --- linux-user/fd-trans.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/linux-user/fd-trans.c b/linux-user/fd-trans.c index 216b9f0614..30425c9df6 100644 --- a/linux-user/fd-trans.c +++ b/linux-user/fd-trans.c @@ -129,6 +129,8 @@ enum { QEMU_IFLA_CARRIER_UP_COUNT, QEMU_IFLA_CARRIER_DOWN_COUNT, QEMU_IFLA_NEW_IFINDEX, + QEMU_IFLA_MIN_MTU, + QEMU_IFLA_MAX_MTU, QEMU___IFLA_MAX }; =20 @@ -166,6 +168,8 @@ enum { QEMU_IFLA_BRPORT_BCAST_FLOOD, QEMU_IFLA_BRPORT_GROUP_FWD_MASK, QEMU_IFLA_BRPORT_NEIGH_SUPPRESS, + QEMU_IFLA_BRPORT_ISOLATED, + QEMU_IFLA_BRPORT_BACKUP_PORT, QEMU___IFLA_BRPORT_MAX }; =20 @@ -510,6 +514,7 @@ static abi_long host_to_target_slave_data_bridge_nlattr= (struct nlattr *nlattr, case QEMU_IFLA_BRPORT_VLAN_TUNNEL: case QEMU_IFLA_BRPORT_BCAST_FLOOD: case QEMU_IFLA_BRPORT_NEIGH_SUPPRESS: + case QEMU_IFLA_BRPORT_ISOLATED: break; /* uint16_t */ case QEMU_IFLA_BRPORT_PRIORITY: @@ -523,6 +528,7 @@ static abi_long host_to_target_slave_data_bridge_nlattr= (struct nlattr *nlattr, break; /* uin32_t */ case QEMU_IFLA_BRPORT_COST: + case QEMU_IFLA_BRPORT_BACKUP_PORT: u32 =3D NLA_DATA(nlattr); *u32 =3D tswap32(*u32); break; @@ -787,6 +793,8 @@ static abi_long host_to_target_data_link_rtattr(struct = rtattr *rtattr) case QEMU_IFLA_GSO_MAX_SIZE: case QEMU_IFLA_CARRIER_UP_COUNT: case QEMU_IFLA_CARRIER_DOWN_COUNT: + case QEMU_IFLA_MIN_MTU: + case QEMU_IFLA_MAX_MTU: u32 =3D RTA_DATA(rtattr); *u32 =3D tswap32(*u32); break; --=20 2.20.1