Bugzilla – Attachment 148 Details for
Bug 401
ipv4 mapped address (ipv4 in ipv6) and ipv6 support fix
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
set length of sockaddr{}. run sshd with glibc-2.2 on linux-2.2
openssh-v4mapped-fix.patch (text/plain), 1.42 KB, created by
YOSHIFUJI Hideaki
on 2002-09-24 03:50:05 AEST
(
hide
)
Description:
set length of sockaddr{}. run sshd with glibc-2.2 on linux-2.2
Filename:
MIME Type:
Creator:
YOSHIFUJI Hideaki
Created:
2002-09-24 03:50:05 AEST
Size:
1.42 KB
patch
obsolete
>diff -ru openssh/canohost.c openssh-fix/canohost.c >--- openssh/canohost.c Thu Jul 11 12:56:47 2002 >+++ openssh-fix/canohost.c Tue Sep 24 02:26:06 2002 >@@ -19,6 +19,12 @@ > #include "log.h" > #include "canohost.h" > >+#ifdef __linux__ >+#ifndef SIN6_LEN_RFC2133 >+#define SIN6_LEN_RFC2133 24 >+#endif >+#endif >+ > static void check_ip_options(int, char *); > > /* >@@ -61,7 +67,13 @@ > from4->sin_family = AF_INET; > memcpy(&from4->sin_addr, &addr, sizeof(addr)); > from4->sin_port = port; >+ fromlen = sizeof(*from4); > } >+#ifdef __linux__ >+ /* quick hack to allow new library on old kernel */ >+ if (fromlen == SIN6_LEN_RFC2133) >+ fromlen = sizeof(struct sockaddr_in6); >+#endif > } > #endif > >@@ -231,6 +243,11 @@ > return NULL; > } > } >+#ifdef __linux__ >+ /* quick hack to allow new library on old kernel */ >+ if (addr.ss_family == AF_INET6 && addrlen == SIN6_LEN_RFC2133) >+ addrlen = sizeof(struct sockaddr_in6); >+#endif > /* Get the address in ascii. */ > if (getnameinfo((struct sockaddr *)&addr, addrlen, ntop, sizeof(ntop), > NULL, 0, flags) != 0) { >@@ -317,6 +334,12 @@ > fatal_cleanup(); > } > } >+#ifdef __linux__ >+ /* quick hack to allow new library on old kernel */ >+ if (from.ss_family == AF_INET6 && >+ fromlen == SIN6_LEN_RFC2133) >+ fromlen = sizeof(struct sockaddr_in6); >+#endif > /* Return port number. */ > if (getnameinfo((struct sockaddr *)&from, fromlen, NULL, 0, > strport, sizeof(strport), NI_NUMERICSERV) != 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 401
:
148
|
194
|
195