From patchwork Tue Mar 26 17:15:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Flavio Leitner X-Patchwork-Id: 1065815 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=sysclose.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=sysclose.org header.i=fbl@sysclose.org header.b="STBC607j"; dkim-atps=neutral Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44THpx6K0Pz9sR9 for ; Wed, 27 Mar 2019 04:16:25 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 07CA5D7E; Tue, 26 Mar 2019 17:15:25 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id F2428D3D for ; Tue, 26 Mar 2019 17:15:22 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sender-of-o51.zoho.com (sender-of-o51.zoho.com [135.84.80.216]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id 9B2558E1 for ; Tue, 26 Mar 2019 17:15:22 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1553620520; cv=none; d=zoho.com; s=zohoarc; b=c9Nhr5bCIiWxjPD/w6ZC1OTj3gMsEqhXzkOxb/D8Q9wJkQ4MFxY6lvIANOMKlLu3ZLX2Lrh9z+ymO66rJg+jzY+fM6Ag3OkckRTFkE+oORqwBQaQVubYjj7FjaSNjMwXcmITyMUijXefMO1WmFl7RC7guo+X01zti+PUBznCLjw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1553620520; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To:ARC-Authentication-Results; bh=mRUVFZth9F7sneOElVgZmObks/PMlKOPbGmcdPlfQ1I=; b=Go39zXmfPIAWczCzSptdA2pVJ3AZcuYUZL4g+wWwmi8XrkS3BmdrC5s4/PfBndhvgM2G2t0ZRNZCz6iU0fALRi1TG/xunL2MY0gMWgfh4Zk2+ZEHHOAH9lBzIJdpLQ/s6FxweovZyQnICz9drwhvRMXsDhSV5C9d48ZFzU7r+uE= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=sysclose.org; spf=pass smtp.mailfrom=fbl@sysclose.org; dmarc=pass header.from= header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1553620520; s=zoho; d=sysclose.org; i=fbl@sysclose.org; h=From:To:Cc:Message-ID:Subject:Date:In-Reply-To:References:MIME-Version:Content-Transfer-Encoding:Content-Type; l=1109; bh=mRUVFZth9F7sneOElVgZmObks/PMlKOPbGmcdPlfQ1I=; b=STBC607jqWvd256ITogmpfNS2cKYaF2cYuZLB+NBLrAJQINhLkt85ZEtxdBj6Xdr Up+igs2eF44cEQuOA6loz23i4ROh8jKbCXAjySwu6NDrQvBCLoO87kIBvGabLku+DHn biyseLhCeEMfVEk3RdYbOBy9xHOO+kK5Ol0S1idI= Received: from localhost (177.183.215.126 [177.183.215.126]) by mx.zohomail.com with SMTPS id 1553620518465198.71708056284206; Tue, 26 Mar 2019 10:15:18 -0700 (PDT) From: Flavio Leitner To: dev@openvswitch.org Message-ID: <20190326171500.9174-3-fbl@sysclose.org> Date: Tue, 26 Mar 2019 14:15:00 -0300 X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190326171500.9174-1-fbl@sysclose.org> References: <20190326171500.9174-1-fbl@sysclose.org> MIME-Version: 1.0 X-ZohoMailClient: External X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Flavio Leitner Subject: [ovs-dev] [PATCH 2/2] netlink linux: fix to append the netnsid netlink attr. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org The attribute was being prepended to the netlink buffer, but the function nl_sock_transact_multiple__() expects to find the netlink header as first to update the length, seq and pid fields. This patch fixes to append the attribute instead of prepending it. Fixes: 756819ddd788 ("netdev-linux: use netlink to update netdev.") Signed-off-by: Flavio Leitner Acked-by: Aaron Conole --- lib/netdev-linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 965e7eee8..5fcd2188a 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -6054,7 +6054,7 @@ netdev_linux_update_via_netlink(struct netdev_linux *netdev) * and the interface name statically stored in ovsdb. */ nl_msg_put_string(&request, IFLA_IFNAME, netdev_get_name(&netdev->up)); if (netdev_linux_netnsid_is_remote(netdev)) { - nl_msg_push_u32(&request, IFLA_IF_NETNSID, netdev->netnsid); + nl_msg_put_u32(&request, IFLA_IF_NETNSID, netdev->netnsid); } error = nl_transact(NETLINK_ROUTE, &request, &reply); ofpbuf_uninit(&request);