|
|
|
@ -57,9 +57,9 @@ diff -up netkit-rsh-0.17/rexecd/rexecd.c.ipv6-rexec netkit-rsh-0.17/rexecd/rexec
@@ -57,9 +57,9 @@ diff -up netkit-rsh-0.17/rexecd/rexecd.c.ipv6-rexec netkit-rsh-0.17/rexecd/rexec
|
|
|
|
|
+ char remote_addr[INET6_ADDRSTRLEN] = {}; |
|
|
|
|
+ |
|
|
|
|
+ if (from.ss_family == AF_INET) |
|
|
|
|
+ remote = inet_ntop(AF_INET, &from, remote_addr, INET_ADDRSTRLEN); |
|
|
|
|
+ remote = inet_ntop(AF_INET, &((struct sockaddr_in *) &from)->sin_addr, remote_addr, INET_ADDRSTRLEN); |
|
|
|
|
+ else |
|
|
|
|
+ remote = inet_ntop(AF_INET6, &from, remote_addr, INET6_ADDRSTRLEN); |
|
|
|
|
+ remote = inet_ntop(AF_INET6, &((struct sockaddr_in6 *) &from)->sin6_addr, remote_addr, INET6_ADDRSTRLEN); |
|
|
|
|
+ |
|
|
|
|
+ if (remote) { |
|
|
|
|
+ remote = strdup(remote); |
|
|
|
|