Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when I do pgm_bind3 to a sockaddr that has the sockaddr->sa_addr.sport set, openpgm reverses the byte order of that value #23

Open
GoogleCodeExporter opened this issue Mar 15, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. call pgm_bind3 with a sockaddr that has sockaddr->sa_addr.sport set to a 
value
2. in socket.c line 2029, it calls htons on that port value, thus reversing it. 
The sport in a sockaddr should already be assumed to be in network byte order


What is the expected output? What do you see instead?
I expect the tsi to use the port value I specified

What version of the product are you using? On what operating system?
linux/windows, openpgm 5.1.118

Please provide any additional information below.
change socket.c line 2029 from:
    sock->tsi.sport = htons (sock->tsi.sport);
to 
    sock->tsi.sport = sock->tsi.sport;

Original issue reported on code.google.com by [email protected] on 17 Aug 2012 at 12:13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant