]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
lockd: initialize sin6_scope_id in lockd_inet6addr_event()
authorScott Mayhew <smayhew@redhat.com>
Thu, 5 Jan 2017 21:34:50 +0000 (16:34 -0500)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 31 Jan 2017 17:31:54 +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/lockd/svc.c

index 1c13dd80744ff99cc0691476c3a2920eca9757cc..7e4ea3b9f4724f2b62f2aa7fe5d89844d07812cd 100644 (file)
@@ -322,6 +322,8 @@ static int lockd_inet6addr_event(struct notifier_block *this,
                dprintk("lockd_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(nlmsvc_rqst->rq_server,
                        (struct sockaddr *)&sin6);
        }