From patchwork Tue Sep 8 15:25:31 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 264235 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3A4EAC2D0A7 for ; Tue, 8 Sep 2020 18:37:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 06EA82098B for ; Tue, 8 Sep 2020 18:37:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599590264; bh=s90aUzkvdM91NHGAnM48+ESinedEbs0jyCdCaIRERok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=cHXG59bkFWjOQosXeI74tnBcc/NUposIf/I0HC81jCTndSMQcFFfalf1XFu6d/wxV 2jZspaByJwk80Jv1ucpU5PWxuhT0xtoqFE65iI9aUSlBFihUSihnf9Ic+xAuFsk91X VciaU3SqXl2MKMtdO6NsdFYYzWas34odM3wShL4U= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731448AbgIHShn (ORCPT ); Tue, 8 Sep 2020 14:37:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:53658 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731317AbgIHQJA (ORCPT ); Tue, 8 Sep 2020 12:09:00 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D37BA23F5C; Tue, 8 Sep 2020 15:48:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1599580096; bh=s90aUzkvdM91NHGAnM48+ESinedEbs0jyCdCaIRERok=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YyuOy2cFFZyqrqpr79N/j4+cCW2RlPWBwl2L2WrrzYvL3kiElL27ZS242BiS2rfSy PYtSL//IyuQ6W6er0sesU5Hyw5rigb+OdG4K9Dyxt4Xea0Fk0/v1ndqyM5p3nj5Ozc P3+UoA/cFczFAg97fi45lENFWMhK7D472yoFNd00= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nicolas Dichtel , Gabriel Ganne , "David S. Miller" , Sasha Levin Subject: [PATCH 4.19 30/88] gtp: add GTPA_LINK info to msg sent to userspace Date: Tue, 8 Sep 2020 17:25:31 +0200 Message-Id: <20200908152222.580536629@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200908152221.082184905@linuxfoundation.org> References: <20200908152221.082184905@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Nicolas Dichtel [ Upstream commit b274e47d9e3f4dcd4ad4028a316ec22dc4533ac7 ] During a dump, this attribute is essential, it enables the userspace to know on which interface the context is linked to. Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)") Signed-off-by: Nicolas Dichtel Tested-by: Gabriel Ganne Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/net/gtp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/gtp.c b/drivers/net/gtp.c index d73850ebb671f..f2fecb6842209 100644 --- a/drivers/net/gtp.c +++ b/drivers/net/gtp.c @@ -1187,6 +1187,7 @@ static int gtp_genl_fill_info(struct sk_buff *skb, u32 snd_portid, u32 snd_seq, goto nlmsg_failure; if (nla_put_u32(skb, GTPA_VERSION, pctx->gtp_version) || + nla_put_u32(skb, GTPA_LINK, pctx->dev->ifindex) || nla_put_be32(skb, GTPA_PEER_ADDRESS, pctx->peer_addr_ip4.s_addr) || nla_put_be32(skb, GTPA_MS_ADDRESS, pctx->ms_addr_ip4.s_addr)) goto nla_put_failure;