nfsd: initialize sin6_scope_id in nfsd_inet6addr_event()
authorScott Mayhew <smayhew@redhat.com>
Thu, 5 Jan 2017 21:34:49 +0000 (16:34 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 31 Jan 2017 17:31:53 +0000 (12:31 -0500)
I noticed this was missing when I was testing with link local addresses.

Signed-off-by: Scott Mayhew <smayhew@redhat.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfssvc.c

index e6bfd96734c006587bd1709d0df48818c2065789..2e378d0479ad3fb560f7534295a7ae8f317e6f62 100644 (file)
@@ -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);
        }