xserver: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Apr 5 13:14:21 UTC 2021


 os/access.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ab8f8c98418db6954b17d93280b7b526fc1d3f7c
Author: Jeremie Courreges-Anglas <jca at wxcvbn.org>
Date:   Thu Jan 21 23:52:15 2021 +0100

    xserver/os: safer IPv6 "kame hack" fix, only override sin6_scope_id if zero
    
    This helps on KAME-based systems which want to get rid of this hack.
    The assumption is that if sin6_scope_id is set, then the interface index
    is no longer embedded in the address.
    
    Signed-off-by: Jeremie Courreges-Anglas <jca at wxcvbn.org>

diff --git a/os/access.c b/os/access.c
index 34ebecad9..b1703048d 100644
--- a/os/access.c
+++ b/os/access.c
@@ -581,7 +581,7 @@ static void
 in6_fillscopeid(struct sockaddr_in6 *sin6)
 {
 #if defined(__KAME__)
-    if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr)) {
+    if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr) && sin6->sin6_scope_id == 0) {
         sin6->sin6_scope_id =
             ntohs(*(u_int16_t *) &sin6->sin6_addr.s6_addr[2]);
         sin6->sin6_addr.s6_addr[2] = sin6->sin6_addr.s6_addr[3] = 0;


More information about the xorg-commit mailing list