From nobody Fri Mar 29 02:36:48 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549537103607594.3882350401448; Thu, 7 Feb 2019 02:58:23 -0800 (PST) Received: from localhost ([127.0.0.1]:37795 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grhNn-0007Kc-Ki for importer@patchew.org; Thu, 07 Feb 2019 05:58:15 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43790) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grhJr-0004eu-OJ for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:12 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grhJq-0008AY-HZ for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:11 -0500 Received: from mout.kundenserver.de ([217.72.192.74]:45071) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grhJq-00089K-7m for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:10 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MTRhS-1gfgke3lqm-00Thl4; Thu, 07 Feb 2019 11:53:53 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 11:53:45 +0100 Message-Id: <20190207105347.22337-2-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207105347.22337-1-laurent@vivier.eu> References: <20190207105347.22337-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:TBjoqLCGNekDDVGjwUhBrAja8T8gCLddNlM8CBWYjADQxxBIx6b kwmGihLNVuacfCteRNYlZEdSoK3JgaTeWUXamhgfF3mAcsWsn8LQ+Pod532/tS8pxatYJIc D+eiOM8TuEI+LwGwvCzUAOio+jQUBBk8Qdz64+Uxv6s21kzlu6srnST0VEVC+NNS1hS4aHE 6F6ivvM3t3VzeoFyK3YLg== X-UI-Out-Filterresults: notjunk:1;V03:K0:oJPB3OPWz0o=:CkGRDaMF89E/DWrBMBWcXe KSirqoLoEGocoJZLffDcnYUX782oxh9ZZY68360mTduSy9uD7G3lJ5DTfSGitXUIRkNgdX4gJ 5PNBO6OJCqoijFw+3LXrXCJ0r0/DjEl2P895zWZ3KfJdTsFxk5SagVG7JirsI5MSWQqX0uoHC Bby2uGeMZKY+bZJEMkfVLVgc36Q40LetUmXYBoUyna+sAu9Ggu9clhCSVfT165oQi+POkKaEI SSoY5VWTqrqWBZXuIoaKlDjrCB1W+yjGxF5egz6o6eNag+ZIIzxTtLWkbAh73kctwPiq7z1BL AzcEaokkiB7uQOwz8BB9tbNMjB1yPVX9Y6snr1rxhEg4J8o8RHcN05z3aVXS+8sLJarPiYC1e UCQQLYrFTVLFiDmGHPjT/mSrGOJLh7QVwhd/0NOdkyKrQ3DBJ7GW6fSPAdIRuADDAR9U+c41E 1gI41oqeKulz0UliMAw6Zf6l6f8fNwITBVDxBqfBO6/fqVm/1AVgoEHFfgsTJSOs1SIvpDXPx f9EvKK0C0WtAEO0TECrW39RtTxnojvUOzUzOrOKMGI8XqPT3gX2frMZnq3QQ90QNtNPSZBum3 W/ld/IrGq4zxq+OETOCVBfjvEqLO8cMshOUFmx0Lv2cdDi+VR7M81QkugcorAX0U+2zXPd+ff PeYVXRpjaizYFu7Lj1P5DGPBl3NcUTQUfavBn3ymssldwgRhfgrwZVdZNFhcOiXzCJQu40ZSB YgV71CXUPOpWPWjUXL6NaRjQlOAP13K4n3xzgQ== 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 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> Signed-off-by: Laurent Vivier --- linux-user/syscall.c | 55 ++++++++++++++++++++++++-------------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index bf076cbf8c..5b9d75fbb4 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -4187,28 +4187,32 @@ 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 +4235,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 Mar 29 02:36:48 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1549536931486570.9602517993667; Thu, 7 Feb 2019 02:55:31 -0800 (PST) Received: from localhost ([127.0.0.1]:37741 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grhL3-0005H9-79 for importer@patchew.org; Thu, 07 Feb 2019 05:55:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grhJq-0004eC-At for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:11 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grhJp-00089Q-IH for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:10 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:40003) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grhJn-00087R-Ga for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:08 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MOzjW-1gSTKn26cW-00PMAU; Thu, 07 Feb 2019 11:53:53 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 11:53:46 +0100 Message-Id: <20190207105347.22337-3-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207105347.22337-1-laurent@vivier.eu> References: <20190207105347.22337-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:ogu536TaEctVGVuCCHnVgd++/KjyT9FiVgdRf0RB64B3ktg0mD/ kHXSud4jXCeZJJ4y2NMADGbBINRGE3+BANbb4YMnf5hu+dFcSDdv02/snxlSrEJ5rjPX2LH T5Srv4lW6njza2xHqOtH73Oyr+vUyhDjzE4jpMoHcVjUM5Tb2pxuwK9/W8NvjyWv+64CF0I 8uw4MAzyClAHBFzHKD0KQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:sgM+yuulIV0=:inHU+O6Ig3q2ECUgjOkLfu EVRtUTucYj1pM/Db+XEEZuOefClJD2dtJSuTX9gpCZ5TNRmiEyD7hJKwBR3khjeqxheID7Wzx B+1sbl2MtzqD2dydpTTdalUkKAFKl7Xe624hfd5vQITEyMBMFDUiIpikl3/q3Oqt6/+szYyPN YyDW03vtcYyi42O/lfdj2GR3aqvGL0nAk9E0u2UWmEm94REGcaJcK4Y44uT06I+7hdaT8qZ31 bGCTVALXibzFzcHcozrqIDK/JUMu7ZQN0Edd3+q21KkZrt++lDhrbCFcIVRJ9OReimpb6vHWJ qXiP6rgyLJJjxuA/qbFOBZFjWVnf9totm9tAUmRcmS5T7SM15IKBFW2regXK+GiSZJJhuSeZm ND26rtDBJgaZkatDJuPL53oVCywTSKzi1/5ikKxc6FUdsmcOjN5sUby17aY3NxM4v8gzw9urC uh2ThJlmTIPo7Cx5TYCrx3/QZxa8cro40Dsq1YM/Rj/gur5hGKumrhUNDRQi6F2s1/xspm4J1 DB87FULtifb2t1Zr+lShHHBQ8N5BIRWt4vWdAh4ETWY7mS7cpFpbEE/wj20c2aSJ/mUlj0kln LGoa4oTQQYTpgNBOuSJeUZ6jjHomOL+puG+YJrZwKHRyN0Vdp0FRaxi9c3WXpb4ZNEau4VoMf frQeXjQ5TE09qPw5hR1tLYMbBqoe65G0NiX2tkqGolSoBM0ati5O2taSBD/YJGA3QUoBlF9gv CgjOnIVayZTKA9olu53/IMLp7AiVVzT5KEhvdq+iKTxg5kNP/W67Fcb3I2Q= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.17.13 Subject: [Qemu-devel] [PULL 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 5b9d75fbb4..a69c734aa0 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -6767,9 +6767,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 Mar 29 02:36:48 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 (209.51.188.17 [209.51.188.17]) by mx.zohomail.com with SMTPS id 154953692948771.28155564836436; Thu, 7 Feb 2019 02:55:29 -0800 (PST) Received: from localhost ([127.0.0.1]:37733 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grhL1-0005FJ-24 for importer@patchew.org; Thu, 07 Feb 2019 05:55:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43743) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1grhJp-0004e5-J1 for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1grhJn-000887-Dy for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:09 -0500 Received: from mout.kundenserver.de ([217.72.192.73]:48829) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1grhJj-00085l-JV for qemu-devel@nongnu.org; Thu, 07 Feb 2019 05:54:05 -0500 Received: from localhost.localdomain ([78.238.229.36]) by mrelayeu.kundenserver.de (mreue107 [212.227.15.183]) with ESMTPSA (Nemesis) id 1MNLZc-1gU7lD3suA-00Onfg; Thu, 07 Feb 2019 11:53:54 +0100 From: Laurent Vivier To: qemu-devel@nongnu.org Date: Thu, 7 Feb 2019 11:53:47 +0100 Message-Id: <20190207105347.22337-4-laurent@vivier.eu> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190207105347.22337-1-laurent@vivier.eu> References: <20190207105347.22337-1-laurent@vivier.eu> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:3c+L5t3BUSnp5VIx7Gjt+zeBTzb4oMw8E/IA4pEHl9kxGlzlfAv UOTGw8vst9dNno2nyvVuJ32TvYcqZh8MNNs7KGnFiVz1TanKk2rufOA8TkFBunB+KpsJ8xH ayPaYhLCi7VLnN0wPUn/hvlKjOXndcZKmhgSbkp+YjqhSSQmnR+7bvPxXd5wpW6pSbcjG/t zZ2KPB4P54dnDd4Qj5owg== X-UI-Out-Filterresults: notjunk:1;V03:K0:ZbIHNlcb7EI=:9DAnmWgzdbejjpWmaIkhMz qWZ7HpfUSUI8JSI12MA2IO5tAErnS19vsz3lhBH+Fd1XgvPtTe+Dpcr8Yt9pRNaS133ESIU6N j6l8EkpOwprG30oVe0jhf7v8m8QDpWDgFqSAtNzoLtG/YrLPida6bvq4CZR2Kmn7trgx21A5z jPscj+Ivhx69/403ZOUKH+fEV1OwdJ5efutapKN8wJtdYA3PiRMhuYwwrqXKXm92zTaX4Yn9O EoIEyCgxjDv+gGSs1a7C93185L2xnSqyG4ihOIY1JM7SOxdGMVxw8GGmNtBoRD29XkMM3zrBI hWICBrFHd9qB5BhKzfVu4YQoN7S8sxwDyDQZfYbzg4IVu/+rA7ueY2SCYwaQ5D2Bb5ZStaYIN QrMCW4pON001vNnBf33+IoEqQ8di+wnNWFWww4Clwx05+8vLOcM2Ycqju8pQaiNEEZaJMfD6K Vajuz2J5teVxKDTQvDMj7DgbT7X0mrn8Lt/OrjKmV5jR6p79f6C3c6Hr/keAiMDFkk1cO7Kbg twj6jgCG6XOoyIZNcsOW9djnD85fI7EfvH8cE9MgUdFFOOZc/K0rMsk1N2iEb4UfvVlelFEew k3IaksDqU2YHunqfuBIPB7a2OJ/U7lZuxuVw2Zygm8iuh5nUEzYxYBD3wjOmEOi9nTiNeH8yn DWyAjDuT6gfkuj/pXKD4mfmiDGFbgYTPvxNzqZ1z6jajXymHqzlJvhlsXt4Mo3xtyDLym53gS UT2dHlj5aSo8Z6w/Ri/9072rTrRA9+cC2DAU3Q== X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 217.72.192.73 Subject: [Qemu-devel] [PULL 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