From patchwork Thu Jan 5 21:34:49 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Mayhew X-Patchwork-Id: 9499699 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C45CF606B4 for ; Thu, 5 Jan 2017 21:35:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B277227FE4 for ; Thu, 5 Jan 2017 21:35:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A19DC2841C; Thu, 5 Jan 2017 21:35:15 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2297427FE4 for ; Thu, 5 Jan 2017 21:35:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937072AbdAEVfN (ORCPT ); Thu, 5 Jan 2017 16:35:13 -0500 Received: from mx1.redhat.com ([209.132.183.28]:32878 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754254AbdAEVfL (ORCPT ); Thu, 5 Jan 2017 16:35:11 -0500 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 083A3C04B311; Thu, 5 Jan 2017 21:34:52 +0000 (UTC) Received: from tonberry.usersys.redhat.com (dhcp145-110.rdu.redhat.com [10.13.145.110]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v05LYpCH009791; Thu, 5 Jan 2017 16:34:51 -0500 Received: by tonberry.usersys.redhat.com (Postfix, from userid 1000) id 7CB6A120C8A; Thu, 5 Jan 2017 16:34:51 -0500 (EST) From: Scott Mayhew To: bfields@fieldses.org, jlayton@poochiereds.net Cc: davej@codemonkey.org.uk, linux-nfs@vger.kernel.org Subject: [PATCH 1/3] nfsd: initialize sin6_scope_id in nfsd_inet6addr_event() Date: Thu, 5 Jan 2017 16:34:49 -0500 Message-Id: <1483652091-25508-2-git-send-email-smayhew@redhat.com> In-Reply-To: <1483652091-25508-1-git-send-email-smayhew@redhat.com> References: <1483652091-25508-1-git-send-email-smayhew@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Thu, 05 Jan 2017 21:34:52 +0000 (UTC) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP I noticed this was missing when I was testing with link local addresses. Signed-off-by: Scott Mayhew --- fs/nfsd/nfssvc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/nfsd/nfssvc.c b/fs/nfsd/nfssvc.c index e6bfd96..2e378d0 100644 --- a/fs/nfsd/nfssvc.c +++ b/fs/nfsd/nfssvc.c @@ -354,6 +354,8 @@ static int nfsd_inet6addr_event(struct notifier_block *this, dprintk("nfsd_inet6addr_event: removed %pI6\n", &ifa->addr); sin6.sin6_family = AF_INET6; sin6.sin6_addr = ifa->addr; + if (ipv6_addr_type(&sin6.sin6_addr) & IPV6_ADDR_LINKLOCAL) + sin6.sin6_scope_id = ifa->idev->dev->ifindex; svc_age_temp_xprts_now(nn->nfsd_serv, (struct sockaddr *)&sin6); }