X2Go Bug report logs - #515
"connectedHost" variable contains wrong IP, reason unknown (was: Re: [X2Go-User] Pb with x2go agent on ppc64 system)

version graph

Package: x2goagent; Maintainer for x2goagent is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2goagent is src:nx-libs.

Reported by: x2go-dev@lists.x2go.org

Date: Wed, 11 Jun 2014 21:55:02 UTC

Severity: normal

Tags: pending

Found in version 3.5.0.24

Fixed in version 2:3.5.0.25

Done: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Wed, 11 Jun 2014 21:55:03 GMT) (full text, mbox, link).


Acknowledgement sent to x2go-dev@lists.x2go.org:
New Bug report received and forwarded. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Wed, 11 Jun 2014 21:55:03 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <newsgroups.mail2@stefanbaur.de>
To: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Cc: x2go-user@lists.x2go.org, x2go-dev@lists.x2go.org, submit@bugs.x2go.org, sebastien chabrolles <s.chabrolles@fr.ibm.com>
Subject: "connectedHost" variable contains wrong IP, reason unknown (was: Re: [X2Go-User] Pb with x2go agent on ppc64 system)
Date: Wed, 11 Jun 2014 23:46:08 +0200
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Package: x2goagent
severity: normal
version: 3.5.0.24

Note: Crossposting and Reply-To'ing to X2Go-Dev due to the need for a
C/C++ coder, also, turning it into a bug so we can keep track of this.

Here's the output the user gets as the connection refuses to establish
itself:

quoting Sebastien Chabrolles:

> running as X2Go Agent
> 
> NXAGENT - Version 3.5.0
> 
> Copyright (C) 2001, 2011 NoMachine. See http://www.nomachine.com/
> for more information.
> 
> Info: Agent running with pid '24808'. Session: Starting session at
> 'Sat Jun  7 15:37:37 2014'. Info: Proxy running in server mode with
> pid '24808'. Info: Waiting for connection from 'localhost' on port
> '30003'. Warning: Refusing connection from '225.3.10.80'. .80' on
> port '30003'. I don't know what is this IP address !!!!!

And at a later attempt, Sebastien received this output:
> running as X2Go Agent
> 
> 
> NXAGENT - Version 3.5.0
> 
> 
> Copyright (C) 2001, 2011 NoMachine.
>  See http://www.nomachine.com/ for more information.
> 
> 
> Info: Agent running with pid '10710'.
>  Session: Starting session at 'Wed Jun 11 23:02:09 2014'.
>  Info: Proxy running in server mode with pid '10710'.
>  Info: Waiting for connection from 'localhost' on port '30006'.
>  Warning: Refusing connection from '141.168.10.80'.
>  Info: Aborting the procedure due to signal '1'.
>  Error: Aborting session with 'Unable to open display
> 'nx/nx,options=/root/.x2go/C-root-51-1402520526_stRWWWBROWSER_dp24/options:51''.
>  Session: Aborting session at 'Wed Jun 11 23:02:19 2014'.
>  Session: Session aborted at 'Wed Jun 11 23:02:19 2014'.


My first guess is/was that there's something endianess-related going
wrong, as he's running X2Go on a ppc64 architecture instead of x86/x64.
However, the fact that the two "wrong" IPs change at random speak
against that, so I may be totally wrong with this and there's a much
simpler reason and solution.

quoting myself, replying to Mike Gabriel there:

>> Do you think you could at least give him a hint as to where that 
>> message is pulling the IP from and how it is being
>> mangled/processed before that?
>> 
>> My guess is that there's some self-made conversion routine
>> somewhere that only works on little-endian architectures like x86
>> and x64.
>> 
>> PPC64 is big-endian by default.


quoting Mike Gabriel:

> you can get the nx-libs sources from git.x2go.org [1] and grep
> through the sources.
> 
> I am currently doing the same to get NX fixed on systems with 
> poly-instantiated /tmp directories.

Here's what I was able to find out so far:

I was able to locate the message in Loop.cpp.
It uses the variable "connectedHost".
So "connectedHost" contains the wrong IP.

connectedHost gets populated (also in Loop.cpp) like this:

char *connectedHost = inet_ntoa(newAddr.sin_addr);

so either newAddr.sin_addr already contains a wrong value (I'm not sure
how to check that, though), or inet_ntoa does something wrong, or both.

I haven't touched C/C++ code since the year 2002 or so, so debugging
this further is way beyond my ken.

Any one of the more experienced coders willing to jump in?


Here's some more info about the X2Go server system as provided by
Sebastien Chabrolles:

# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4
localhost4.localdomain4
::1         localhost localhost.localdomain localhost6
localhost6.localdomain6
10.7.19.161     fc20-161

# cat /etc/resolv.conf
nameserver 129.35.160.4

#cat /etc/nsswitch.conf
passwd:     files
shadow:     files
group:      files
###
#this strange-looking entry was present during the first tries.
#
#hosts:      files mdns4_minimal [NOTFOUND=return] dns myhostname
#
# it was changed to the one below for the last try, which gave
# the result with the different, but still wrong, IP.
###
hosts:      files dns
bootparams: nisplus [NOTFOUND=return] files
ethers:     files
netmasks:   files
networks:   files
protocols:  files
rpc:        files
services:   files
netgroup:   files
publickey:  nisplus
automount:  files
aliases:    files nisplus

# ifconfig -a
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.7.19.161  netmask 255.255.255.0  broadcast 10.7.19.255

        inet6 fe80::f816:3eff:feec:ecb8  prefixlen 64  scopeid
0x20<link>
        ether fa:16:3e:ec:ec:b8  txqueuelen 1000  (Ethernet)

        RX packets 90677  bytes 5717673 (5.4 MiB)

        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 89102  bytes 32828059 (31.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 0  (Local Loopback)
        RX packets 76  bytes 5248 (5.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 76  bytes 5248 (5.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0


# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref
Use Iface
0.0.0.0         10.7.19.254     0.0.0.0         UG    0      0
0 eth0
10.7.19.0       0.0.0.0         255.255.255.0   U     0      0
0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0
0 eth0


- -Stefan


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTmM4gAAoJEG7d9BjNvlEZ1MYH/0X8PNPuZUCxkhkUGndLFaez
O0fARZVEa8VWby4jMWUlujgux3lxzcEU1MJ5JluduoTgPwWXUrqlouymEqX1eUqX
AnO4W2OKUiOdHEvj89zWFFQIuL8msBdnfJqC1CE1Z7MZ45vA94eztZ8E1wpwtgRd
jJq4pa9sR4iz20CamAhWNbu75pBdxGxMYf1KtQFkFOo1kL7RiPA0Z/dNZspeVI3A
zVT8CwvnRe+SY3RczOZvlkgXK2CWFaOsATt44hK752ky8v9JCo90wchFrXC++v8r
OBtZDOlG5h7aq25VZjP/YWOdTLIyIyGE+tgNDaN+D1Ip+Y/uDFbTGtcMCLx29d0=
=ii4y
-----END PGP SIGNATURE-----


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Thu, 12 Jun 2014 17:50:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Baur <newsgroups.mail2@stefanbaur.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 12 Jun 2014 17:50:03 GMT) (full text, mbox, link).


Message #10 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <newsgroups.mail2@stefanbaur.de>
To: 515@bugs.x2go.org
Subject: Fwd: Re: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Thu, 12 Jun 2014 19:43:26 +0200


-------- Original-Nachricht --------
Betreff: 	Re: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains
wrong IP, reason unknown
Datum: 	Thu, 12 Jun 2014 19:39:37 +0200
Von: 	sebastien chabrolles <s.chabrolles@fr.ibm.com>
An: 	Stefan Baur <newsgroups.mail2@stefanbaur.de>
Kopie (CC): 	x2go-dev@lists.x2go.org, x2go-dev-bounces@lists.x2go.org



sorry Stefan,

I missed your message

I'm currently at home, thru internet + openVPN. Here is the traceroute
output
Unfortunatly, some router doesn't sent their IP.

traceroute to 10.7.19.161 (10.7.19.161), 30 hops max, 60 byte packets
 1  10.32.0.1 (10.32.0.1)  41.263 ms  42.800 ms  43.497 ms
 2  * * *
 3  * * *
 4  * * *
 5  10.7.19.161 (10.7.19.161)  57.182 ms  58.998 ms  59.124 ms

Client IP is 192.168.0.113 (My personal Home network)
but my tun0 interface (OpenVPN client) is 10.32.0.8

Server has the following IP : 10.7.19.161


Cordialement / Best Regards




	Sébastien Chabrolles
Power Systems Benchmark Specialist
IBM Client Center, Montpellier
1 rue vieille poste 34000 Montpellier FRANCE
Tel +33 4 67 34 40 95
Email : s.chabrolles@fr.ibm.com







From:        Stefan Baur <newsgroups.mail2@stefanbaur.de>
To:        x2go-dev@lists.x2go.org
Date:        12/06/2014 19:29
Subject:        Re: [X2Go-Dev] [X2Go-User] "connectedHost" variable
contains wrong IP, reason unknown
Sent by:        x2go-dev-bounces@lists.x2go.org

------------------------------------------------------------------------



Am 12.06.2014 18:39, schrieb Mihai Moldovan:

> Sebastien, how are you connecting? Via an IPv4 address, or via a host
name? Does
> the host name by any chance contain multiple addresses?

I had asked Sebastien (off-list, yesterday) to provide IPs of client and
host as well as traceroutes between them (back and forth), but haven't
heard back from him yet.
Also, regarding the Name vs. IP question, seconded (I think I asked him
before, too, again, off-list, but it seems he skipped that question).

If I hear from him, I will add the info to BTS.

-Stefan
_______________________________________________
x2go-dev mailing list
x2go-dev@lists.x2go.org
http://lists.x2go.org/listinfo/x2go-dev



Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 655.732.332,20 €
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A



Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Thu, 12 Jun 2014 20:00:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Baur <newsgroups.mail2@stefanbaur.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Thu, 12 Jun 2014 20:00:03 GMT) (full text, mbox, link).


Message #15 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <newsgroups.mail2@stefanbaur.de>
To: Mihai Moldovan <ionic@ionic.de>, sebastien chabrolles <s.chabrolles@fr.ibm.com>
Cc: 515@bugs.x2go.org, x2go-dev@lists.x2go.org
Subject: Re: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Thu, 12 Jun 2014 21:59:59 +0200
Guys, please cc: 515@bugs.x2go.org instead of
x2go-dev-bounces@lists.x2go.org - no idea how that address ended up in here.
(CCing so it shows up in the bugtracker)

Am 12.06.2014 21:48, schrieb Mihai Moldovan:
> Hello Sebastien
> 
> Please don't mind me answering inline.
> 
> 
> * On 12.06.2014 07:28 pm, sebastien chabrolles wrote:
>> So, I don't say that the problem is due to Endianness, but we have to keep in
>> mind that fedora 20 ppc64 is BIG Endian.
> 
> Yes, but big endian is fine. All those functions operate in network byte order,
> which is big endian. No conversion is taking place in the code, as that would be
> unnecessary anyway. Only inet_ntoa() is writing the quad dotted decimal address
> to a string buffer in host endianness. However, this is done by the operating
> system, so NX can (and is) agnostic about it.
> 
> 
>> For the connection, I use IPV4 addresse, no hostname. There is only one IP on
>> the server.
> 
> OK. I was asking because the code is calling gethostbyname() which, when given a
> host name, looks up the address of that specified host name. If, however, the
> host name should have multiple addresses, all of them will be returned in a list
> -- their order depending on how the DNS server spits them out. Most DNS servers
> use a round-robin method for this, so you will get a different ordering with
> each lookup.
> 
> That was one possible explanation for what you might have experienced.
> 
> However, if you're only using IP addresses directly everywhere, gethostbyname()
> merely converts the given string to its binary address representation in network
> byte order. Thus, the functionality is almost equal to inet_aton() (just the way
> the information is returned differs, but that's no functional change.)
> 
> 
>> If you need to have access to the server, this can be done with openVPN
>> certificate. This is only a "sandbox server" to reproduce the x2go issue.
> 
> Providing a means to debug the issue would be great, because at that time I have
> no valid explanation for what is happening there.
> 
> Were those packages installed via binary packages? Unfortunately, x2go doesn't
> ship debug builds.
> 
> Please make sure that the machine in question features build tools and gdb, as
> nxcomp/nxproxy will need to be compiled with debug information in order to get
> anything interesting out of it.



Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Fri, 13 Jun 2014 16:15:03 GMT) (full text, mbox, link).


Acknowledgement sent to sebastien chabrolles <s.chabrolles@fr.ibm.com>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Fri, 13 Jun 2014 16:15:03 GMT) (full text, mbox, link).


Message #20 received at 515@bugs.x2go.org (full text, mbox, reply):

From: sebastien chabrolles <s.chabrolles@fr.ibm.com>
To: 515@bugs.x2go.org, Mihai Moldovan <ionic@ionic.de>
Subject: Re: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Fri, 13 Jun 2014 18:10:32 +0200
[Message part 1 (text/plain, inline)]
Hi Guys,

Just to tell you, I have reproduce the issue on another machine in RedHat 
7.0 ppc64

IP of this system is different (10.7.19.168) which could explain the 
different IP in the session.log...
But again, I don't know what is this IP addresse. ....

running as X2Go Agent

NXAGENT - Version 3.5.0

Copyright (C) 2001, 2011 NoMachine.
See http://www.nomachine.com/ for more information.

Info: Agent running with pid '11574'.
Session: Starting session at 'Fri Jun 13 17:00:02 2014'.
Info: Proxy running in server mode with pid '11574'.
Info: Waiting for connection from 'localhost' on port '30003'.
Warning: Refusing connection from '138.119.178.116'.
116' on port '30003'.

Cordialement / Best Regards







Sébastien Chabrolles
Power Systems Benchmark Specialist
IBM Client Center, Montpellier 
1 rue vieille poste 34000 Montpellier FRANCE 
Tel +33 4 67 34 40 95
Email : s.chabrolles@fr.ibm.com

  

Sauf indication contraire ci-dessus:/ Unless stated otherwise above:
Compagnie IBM France
Siège Social : 17 avenue de l'Europe, 92275 Bois-Colombes Cedex
RCS Nanterre 552 118 465
Forme Sociale : S.A.S.
Capital Social : 655.732.332,20 ?
SIREN/SIRET : 552 118 465 03644 - Code NAF 6202A 
[Message part 2 (text/html, inline)]
[Message part 3 (image/jpeg, inline)]
[Message part 4 (image/jpeg, inline)]
[Message part 5 (image/jpeg, inline)]
[Message part 6 (image/jpeg, inline)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Fri, 13 Jun 2014 16:25:03 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Fri, 13 Jun 2014 16:25:03 GMT) (full text, mbox, link).


Message #25 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: sebastien chabrolles <s.chabrolles@fr.ibm.com>
Cc: 515@bugs.x2go.org
Subject: Re: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Fri, 13 Jun 2014 18:15:27 +0200
[Message part 1 (text/plain, inline)]
* On 12.06.2014 09:48 pm, Mihai Moldovan wrote:
>> For the connection, I use IPV4 addresse, no hostname. There is only one IP on
>> the server.
> OK. I was asking because the code is calling gethostbyname() which, when given a
> host name, looks up the address of that specified host name. If, however, the
> host name should have multiple addresses, all of them will be returned in a list
> -- their order depending on how the DNS server spits them out. Most DNS servers
> use a round-robin method for this, so you will get a different ordering with
> each lookup.
>
> That was one possible explanation for what you might have experienced.
>
> However, if you're only using IP addresses directly everywhere, gethostbyname()
> merely converts the given string to its binary address representation in network
> byte order. Thus, the functionality is almost equal to inet_aton() (just the way
> the information is returned differs, but that's no functional change.)

Follow-up: I've written a simple program to look up hosts using the OS-provided
functions getaddrinfo() and inet_ntop(). If you (Sebastien) are interested, take
a look in /usr/src/domainlookup, although it's really boring.

Output for "./getaddrinfo localhost 127.0.0.1 loopback":

### information for localhost ###
addr 1: 127.0.0.1 (length 9)
addr 2: 127.0.0.1 (length 9)
addr 3: 127.0.0.1 (length 9)
addr 4: 127.0.0.1 (length 9)
addr 5: 127.0.0.1 (length 9)
addr 6: 127.0.0.1 (length 9)

### information for 127.0.0.1 ###
addr 1: 127.0.0.1 (length 9)
addr 2: 127.0.0.1 (length 9)
addr 3: 127.0.0.1 (length 9)

### information for loopback ###


Thus, it doesn't look like a system issue. The returned addresses are just fine.
Even if something WERE to convert 127.0.0.1 to "localhost" and back to an
address, the address list for localhost is fine and does not contain the unknown
addresses.

Seems like we're really seeing an nx bug on ppc64.

I'll supply more information later when I get back.



Mihai

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Sat, 14 Jun 2014 01:10:03 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Sat, 14 Jun 2014 01:10:03 GMT) (full text, mbox, link).


Message #30 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: 515@bugs.x2go.org
Subject: Re: Bug#515: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Sat, 14 Jun 2014 03:05:02 +0200
[Message part 1 (text/plain, inline)]
* On 14.06.2014 01:22 am, Mihai Moldovan wrote:
> WaitForRemote(int) is being called by nxagent/x2goagent. Thus, I should be
> rather debugging that and not nxproxy...

Sorry for sending the last eMail to the wrong bug number, Mike. I got confused
with the threads and was adding the addressing manually. :(

However, I have good news for #515. I was able to fix the bug.

I'll be writing a roundup and attaching a patch, soon.

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Sat, 14 Jun 2014 01:45:03 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Sat, 14 Jun 2014 01:45:03 GMT) (full text, mbox, link).


Message #35 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: 515@bugs.x2go.org
Cc: sebastien chabrolles <s.chabrolles@fr.ibm.com>
Subject: Re: Bug#515: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Sat, 14 Jun 2014 03:40:07 +0200
[Message part 1 (text/plain, inline)]
Basically, the addresses Sebastien has seen were "nothing more" than
uninitialized memory.

The underlaying issue was that accept() wants a socklen_t *addrlen parameter.
The original code created a size_t variable to store the size of the sockaddr
structure where information like the IP address is to be written. This value has
been, correctly, set to 16. It was then casted to (socklen_t) and given to accept().

The problem, however, is that socklen_t is defined as a 4 byte integer, while
size_t is at least 8 bytes wide on ppc64. (I highly recommend reading man 2
accept and the in the man page included Linus Torvald rant on that matter!)

This is "not a big deal" on little endian machines, as casting size_t to
socklen_t there will only cut the upper 4 bytes off and leave you with the lower
4 bytes -- which is just fine, as struct sockaddr isn't bigger than 2^32-1 bytes
anyway. 16 stays 16 in that case.

Doing the same thing on big endian machines, however, cuts the lower 4 bytes off
and leaves you with the upper 4 bytes. As the original value was "16", the upper
4 bytes were all zero.

Thus, zero was passed as the addrlen parameter to accept().

As the addrlen parameter defines how many bytes may be written to the sockaddr
structure given to accept(), the function didn't even touch addr. Hence, addr
was left in its original, un-initialized state.

It was an endianness issue after all, but not exactly where anyone would have
expected it.

The fix is trivial -- don't use size_t as the type of the addrlen variable, but
socklen_t, which will also remove the need of casting.


Mike: I hope the patch applies fine. I have quiltimported all other patches
before, so my patch is based on the patched nx-libs repository.
[nx-libs-ppc64.diff (text/plain, attachment)]
[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Sat, 14 Jun 2014 04:30:03 GMT) (full text, mbox, link).


Acknowledgement sent to Mihai Moldovan <ionic@ionic.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Sat, 14 Jun 2014 04:30:03 GMT) (full text, mbox, link).


Message #40 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Mihai Moldovan <ionic@ionic.de>
To: 515@bugs.x2go.org
Cc: sebastien chabrolles <s.chabrolles@fr.ibm.com>
Subject: Re: Bug#515: [X2Go-Dev] [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Sat, 14 Jun 2014 06:26:24 +0200
[Message part 1 (text/plain, inline)]
Oh, and thanks again to Sebastien for providing access to a Power8 machine for
debugging and building purposes!

[smime.p7s (application/pkcs7-signature, attachment)]

Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Sat, 14 Jun 2014 09:25:03 GMT) (full text, mbox, link).


Acknowledgement sent to Stefan Baur <newsgroups.mail2@stefanbaur.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Sat, 14 Jun 2014 09:25:03 GMT) (full text, mbox, link).


Message #45 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Stefan Baur <newsgroups.mail2@stefanbaur.de>
To: Mihai Moldovan <ionic@ionic.de>, 515@bugs.x2go.org, s.chabrolles@fr.ibm.com
Subject: Re: [X2Go-Dev] Bug#515: [X2Go-User] "connectedHost" variable contains wrong IP, reason unknown
Date: Sat, 14 Jun 2014 11:19:47 +0200
Am 14.06.2014 03:40, schrieb Mihai Moldovan:
> It was an endianness issue after all, but not exactly where anyone would have
> expected it.

Ha! :-D

@Mihai: Thanks for helping Sebastien out.

@Sebastien: Once your customer's appliance is ready, feel free to add a
description of it at
http://wiki.x2go.org/doku.php/doc:deployment-stories:start (you will
need a Wiki account for this). We're always happy to list success
stories from our users. :-)

-Stefan


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Sat, 14 Jun 2014 22:45:02 GMT) (full text, mbox, link).


Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Sat, 14 Jun 2014 22:45:02 GMT) (full text, mbox, link).


Message #50 received at 515@bugs.x2go.org (full text, mbox, reply):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: 515-submitter@bugs.x2go.org
Cc: control@bugs.x2go.org, 515@bugs.x2go.org
Subject: X2Go issue (in src:nx-libs) has been marked as pending for release
Date: Sun, 15 Jun 2014 00:42:16 +0200 (CEST)
tag #515 pending
fixed #515 2:3.5.0.25
thanks

Hello,

X2Go issue #515 (src:nx-libs) reported by you has been
fixed in X2Go Git. You can see the changelog below, and you can
check the diff of the fix at:

    http://code.x2go.org/gitweb?p=nx-libs.git;a=commitdiff;h=36f4e34

The issue will most likely be fixed in src:nx-libs (2:3.5.0.25).

light+love
X2Go Git Admin (on behalf of the sender of this mail)

---
commit 36f4e34b2702eabe991ec97dc0064c3b2b4d12fe
Author: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Date:   Sun Jun 15 00:33:28 2014 +0200

    Add 029_nxcomp_ppc64.full+lite.patch. Fix sockaddr handling on Big Endian systems (like PPC64). (Fixes: #515).

diff --git a/debian/changelog b/debian/changelog
index 6e5a49e..2729b30 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -15,6 +15,8 @@ nx-libs (2:3.5.0.25-0x2go1) UNRELEASED; urgency=low
   * Add 302_nx-X11_xkbbasedir-detection.patch. For detecting XkbBaseDir
     test for xkb/rules/base instead of testing for deprecated file
     xkb/keymap.dir. (Fixes: #40).
+  * Add 029_nxcomp_ppc64.full+lite.patch. Fix sockaddr handling on
+    Big Endian systems (like PPC64). (Fixes: #515).
 
  -- Mike Gabriel <mike.gabriel@das-netzwerkteam.de>  Wed, 07 May 2014 09:58:10 +0200
 


Added tag(s) pending. Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to control@bugs.x2go.org. (Sat, 14 Jun 2014 22:45:02 GMT) (full text, mbox, link).


Marked as fixed in versions 2:3.5.0.25. Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to control@bugs.x2go.org. (Sat, 14 Jun 2014 22:45:02 GMT) (full text, mbox, link).


Message sent on to x2go-dev@lists.x2go.org:
Bug#515. (Sat, 14 Jun 2014 22:45:02 GMT) (full text, mbox, link).


Message sent on to x2go-dev@lists.x2go.org:
Bug#515. (Mon, 30 Jun 2014 12:25:22 GMT) (full text, mbox, link).


Message #60 received at 515-submitter@bugs.x2go.org (full text, mbox, reply):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: 515-submitter@bugs.x2go.org
Cc: control@bugs.x2go.org, 515@bugs.x2go.org
Subject: X2Go issue (in src:nx-libs) has been marked as closed
Date: Mon, 30 Jun 2014 14:24:35 +0200 (CEST)
close #515
thanks

Hello,

we are very hopeful that X2Go issue #515 reported by you
has been resolved in the new release (2:3.5.0.25) of the
X2Go source project »src:nx-libs«.

You can view the complete changelog entry of src:nx-libs (2:3.5.0.25)
below, and you can use the following link to view all the code changes
between this and the last release of src:nx-libs.

    http://code.x2go.org/gitweb?p=nx-libs.git;a=commitdiff;h=be23e057f28a6624380a91d1ba36cbf5df6c3fff;hp=460a3cb3911bbfb717d0259947fe05f68d964948

If you feel that the issue has not been resolved satisfyingly, feel
free to reopen this bug report or submit a follow-up report with
further observations described based on the new released version
of src:nx-libs.

Thanks a lot for contributing to X2Go!!!

light+love
X2Go Git Admin (on behalf of the sender of this mail)

---
X2Go Component: src:nx-libs
Version: 2:3.5.0.25-0x2go1
Status: RELEASE
Date: Mon, 30 Jun 2014 14:05:46 +0200
Fixes: 40 339 490 504 505 515 516
Changes: 
 nx-libs (2:3.5.0.25-0x2go1) RELEASED; urgency=low
 .
   [ Mihai Moldovan ]
   * Add 029_nxcomp_ppc64.full+lite.patch. Fix sockaddr handling on
     Big Endian systems (like PPC64). (Fixes: #515).
   * Add 057_nx-X11_sanitize-eventmasks.full.patch. Fix
     failures in session windows coming up on Big Endian systems
     like PPC64. (Fixes: #516).
   * Improve 105_nxagent_export-remote-keyboard-config.full.patch.
     Don't print out nonsensical information, if there really was
     no error when creating the keyboard file or the other way around.
     Also add the reason when failing to create the keyboard file.
     Only print an error message if SessionPath *really* is not defined.
   * Improve 028_nx-X11_abstract-kernel-sockets.full.patch. Make it more
     Big Endian robust by assigning correct types for socklen_t objects.
   * Add 990_fix-DEBUG-and-TEST-builds.full.patch. Fix debug builds (e.g.
     when globally setting -DDEBUG and -DTEST at build time).
 .
   [ Nito Martínez ]
   * Add 212_nxcomp_build-on-Android.patch. Fix FTBFS of nxproxy/nxcomp when
     build against the Android system. (Fixes: #339).
 .
   [ Oleksandr Shneyder ]
   * Add 210_nxagent_nxcomp_save_session_state.full+lite.patch. Save session
     state in path specified by "state" option in agent options file. If
     option is omitted, session state will not be saved. Session states are:
     STARTING, RUNNING, SUSPENDING, SUSPENDED, RESUMING, TERMINATING,
     TERMINATED.
   * Add 211_nxcomp_set_default_options.full+lite.patch. Set default arguments
     for options 'link' and 'pack' to avoid session damage by resuming with
     incorrect options file.
 .
   [ Mike Gabriel ]
   * Add 606_nx-X11_build-on-aarch64.full.patch. Build on aarch64
     architectures. (Fixes: #490).
   * Add 027_nxcomp_abstract-X11-socket.full+lite.patch. In proxy mode "server"
     let NX proxy attempt connecting to the abstract X11 socket first, and only
     fallback to the file system socket, if the abstract socket is not
     available. (Fixes: #505).
   * Add 028_nx-X11_abstract-kernel-sockets.full.patch. Provide abstract local
     socket support for Linux based systems. This patch pulls in abstract
     socket relevant code from xtrans 1.2.7. (Fixes: #504).
   * Add 302_nx-X11_xkbbasedir-detection.patch. For detecting XkbBaseDir
     test for xkb/rules/base instead of testing for deprecated file
     xkb/keymap.dir. (Fixes: #40).
   * Add 206_nxagent_clipboard-as-nxoption.full.patch. Make the clipboard
     option configurable in nxagent via NX options as addition to the
     command line parameter -clipboard. Note that the command line
     parameter overrides the clipboard NX option. Possible values are
     both or 1, client, server, none or 0.
 .
   * Update patches, to make them apply cleanly after above changes:
     + 220_nxproxy-bind-loopback-only.full+lite.patch
     + 016_nx-X11_install-location.debian.patch
     + 056_nx-X11-Werror-format-security.full.patch
     + 108_nxagent_wine-close-delay.full.patch
     + 300_nxagent_set-wm-class.full.patch
     + 320_nxagent_configurable-keystrokes.full.patch
 .
   * Rename patches to match our naming scheme:
     + 008_nxcomp_sa-restorer.full+lite.patch
     + 009_nxagent_add-man-page.full.patch
     + 009_nxproxy_add-man-page.full+lite.patch
     + 056_nx-X11_Werror-format-security.full.patch
     + 209_x2goagent_add-man-page.full.patch
     + 220_nxproxy_bind-loopback-only.full+lite.patch


Message sent on to x2go-dev@lists.x2go.org:
Bug#515. (Mon, 30 Jun 2014 12:25:23 GMT) (full text, mbox, link).


Message #63 received at 515-submitter@bugs.x2go.org (full text, mbox, reply):

From: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
To: 515-submitter@bugs.x2go.org
Cc: control@bugs.x2go.org, 515@bugs.x2go.org
Subject: X2Go issue (in src:nx-libs) has been marked as closed
Date: Mon, 30 Jun 2014 14:24:39 +0200 (CEST)
close #515
thanks

Hello,

we are very hopeful that X2Go issue #515 reported by you
has been resolved in the new release (2:3.5.0.25) of the
X2Go source project »src:nx-libs«.

You can view the complete changelog entry of src:nx-libs (2:3.5.0.25)
below, and you can use the following link to view all the code changes
between this and the last release of src:nx-libs.

    http://code.x2go.org/gitweb?p=nx-libs.git;a=commitdiff;h=8d4317e7e4fccbe6906c5ba57b8d0101868f92f3;hp=460a3cb3911bbfb717d0259947fe05f68d964948

If you feel that the issue has not been resolved satisfyingly, feel
free to reopen this bug report or submit a follow-up report with
further observations described based on the new released version
of src:nx-libs.

Thanks a lot for contributing to X2Go!!!

light+love
X2Go Git Admin (on behalf of the sender of this mail)

---
X2Go Component: src:nx-libs
Version: 2:3.5.0.25-0x2go1
Status: RELEASE
Date: Mon, 30 Jun 2014 14:05:46 +0200
Fixes: 40 339 490 504 505 515 516
Changes: 
 nx-libs (2:3.5.0.25-0x2go1) RELEASED; urgency=low
 .
   [ Mihai Moldovan ]
   * Add 029_nxcomp_ppc64.full+lite.patch. Fix sockaddr handling on
     Big Endian systems (like PPC64). (Fixes: #515).
   * Add 057_nx-X11_sanitize-eventmasks.full.patch. Fix
     failures in session windows coming up on Big Endian systems
     like PPC64. (Fixes: #516).
   * Improve 105_nxagent_export-remote-keyboard-config.full.patch.
     Don't print out nonsensical information, if there really was
     no error when creating the keyboard file or the other way around.
     Also add the reason when failing to create the keyboard file.
     Only print an error message if SessionPath *really* is not defined.
   * Improve 028_nx-X11_abstract-kernel-sockets.full.patch. Make it more
     Big Endian robust by assigning correct types for socklen_t objects.
   * Add 990_fix-DEBUG-and-TEST-builds.full.patch. Fix debug builds (e.g.
     when globally setting -DDEBUG and -DTEST at build time).
 .
   [ Nito Martínez ]
   * Add 212_nxcomp_build-on-Android.patch. Fix FTBFS of nxproxy/nxcomp when
     build against the Android system. (Fixes: #339).
 .
   [ Oleksandr Shneyder ]
   * Add 210_nxagent_nxcomp_save_session_state.full+lite.patch. Save session
     state in path specified by "state" option in agent options file. If
     option is omitted, session state will not be saved. Session states are:
     STARTING, RUNNING, SUSPENDING, SUSPENDED, RESUMING, TERMINATING,
     TERMINATED.
   * Add 211_nxcomp_set_default_options.full+lite.patch. Set default arguments
     for options 'link' and 'pack' to avoid session damage by resuming with
     incorrect options file.
 .
   [ Mike Gabriel ]
   * Add 606_nx-X11_build-on-aarch64.full.patch. Build on aarch64
     architectures. (Fixes: #490).
   * Add 027_nxcomp_abstract-X11-socket.full+lite.patch. In proxy mode "server"
     let NX proxy attempt connecting to the abstract X11 socket first, and only
     fallback to the file system socket, if the abstract socket is not
     available. (Fixes: #505).
   * Add 028_nx-X11_abstract-kernel-sockets.full.patch. Provide abstract local
     socket support for Linux based systems. This patch pulls in abstract
     socket relevant code from xtrans 1.2.7. (Fixes: #504).
   * Add 302_nx-X11_xkbbasedir-detection.patch. For detecting XkbBaseDir
     test for xkb/rules/base instead of testing for deprecated file
     xkb/keymap.dir. (Fixes: #40).
   * Add 206_nxagent_clipboard-as-nxoption.full.patch. Make the clipboard
     option configurable in nxagent via NX options as addition to the
     command line parameter -clipboard. Note that the command line
     parameter overrides the clipboard NX option. Possible values are
     both or 1, client, server, none or 0.
 .
   * Update patches, to make them apply cleanly after above changes:
     + 220_nxproxy-bind-loopback-only.full+lite.patch
     + 016_nx-X11_install-location.debian.patch
     + 056_nx-X11-Werror-format-security.full.patch
     + 108_nxagent_wine-close-delay.full.patch
     + 300_nxagent_set-wm-class.full.patch
     + 320_nxagent_configurable-keystrokes.full.patch
 .
   * Rename patches to match our naming scheme:
     + 008_nxcomp_sa-restorer.full+lite.patch
     + 009_nxagent_add-man-page.full.patch
     + 009_nxproxy_add-man-page.full+lite.patch
     + 056_nx-X11_Werror-format-security.full.patch
     + 209_x2goagent_add-man-page.full.patch
     + 220_nxproxy_bind-loopback-only.full+lite.patch


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Mon, 30 Jun 2014 12:25:30 GMT) (full text, mbox, link).


Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 30 Jun 2014 12:25:30 GMT) (full text, mbox, link).


Information forwarded to x2go-dev@lists.x2go.org, X2Go Developers <x2go-dev@lists.x2go.org>:
Bug#515; Package x2goagent. (Mon, 30 Jun 2014 12:25:31 GMT) (full text, mbox, link).


Acknowledgement sent to Mike Gabriel <mike.gabriel@das-netzwerkteam.de>:
Extra info received and forwarded to list. Copy sent to X2Go Developers <x2go-dev@lists.x2go.org>. (Mon, 30 Jun 2014 12:25:31 GMT) (full text, mbox, link).


Marked Bug as done Request was from Mike Gabriel <mike.gabriel@das-netzwerkteam.de> to control@bugs.x2go.org. (Mon, 30 Jun 2014 12:30:01 GMT) (full text, mbox, link).


Notification sent to x2go-dev@lists.x2go.org:
Bug acknowledged by developer. (Mon, 30 Jun 2014 12:30:01 GMT) (full text, mbox, link).


Bug archived. Request was from Debbugs Internal Request <owner@bugs.x2go.org> to internal_control@bugs.x2go.org. (Tue, 29 Jul 2014 05:24:01 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Fri Nov 22 00:47:48 2019; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.