]> git.michaelhowe.org Git - packages/o/openafs.git/commit
Return SRV record ports in network byte order
authorRuss Allbery <rra@stanford.edu>
Thu, 14 Oct 2010 20:41:45 +0000 (13:41 -0700)
committerDerrick Brashear <shadow@dementia.org>
Tue, 26 Oct 2010 01:08:40 +0000 (18:08 -0700)
commit28f65219b409136e0bc66358f5711b32277baad2
tree7619a6ec426759aebe470e16318851b62d1165be
parente3f8208e33c20713b8d0f61aa6af8f4dd96c359e
Return SRV record ports in network byte order

Convert the port extracted from the SRV record return to network byte
order before assigning it to the port array.

The port in a SRV record is extracted by pulling out the high byte
and low byte and then mathematically combining them, which implicity
converts from network byte order to host byte order.  However, the
callers of afsconf_LookupServer expect the port array to be returned
in network byte order since ports are assigned without modification
to the .sin_port field of a struct sockaddr_in.  See also the byte
order of the default afsdbPort value.

Reported by Jan Christoph Nordholz (Debian Bug#600228).

Reviewed-on: http://gerrit.openafs.org/2985
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Reviewed-by: Jeffrey Altman <jaltman@openafs.org>
Tested-by: Jeffrey Altman <jaltman@openafs.org>
(cherry picked from commit ffe445483a07c751202a1ef06136f70402ec895d)
Change-Id: I918ed4acdcfecbe1f879746d80b501714f1e775f
Reviewed-on: http://gerrit.openafs.org/3107
Tested-by: Derrick Brashear <shadow@dementia.org>
src/auth/cellconfig.c