]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r277352:
authorrstone <rstone@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 28 Jan 2015 21:51:34 +0000 (21:51 +0000)
committerrstone <rstone@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Wed, 28 Jan 2015 21:51:34 +0000 (21:51 +0000)
commit3b11fe69576097237d3ca585c08dbd7d6a23c9f8
tree9b7ae2fb8087b33a3125b577de331809799eae9b
parent734b4599d59019f70d86dfdb0e923465ade88a10
MFC r277352:

  When mountd is creating sockets, it iterates over all addresses specified
  in the "hosts" array and eventually looks up the network address with
  getaddrinfo(). At one point it checks for a numeric address and if it
  sees one, it sets a hint parameter to force getaddrinfo to interpret the
  host as a numeric address. However that hint is not cleared for subsequent
  iterations of the loop and if any hosts seen after this point are host names,
  getaddrinfo will fail on the name.  The result of this bug is that you cannot
  pass a host name to the -h flag.

  Unfortunately, the first iteration will either process ::1 or 127.0.0.1,
  so the flag is set on the first iteration and all host names will fail
  to be processed.

  The same bug applies to rpc.lockd and rpc.statd, so fix them too.

  Differential Revision:        https://reviews.freebsd.org/D1507
  Reported by:  Dylan Martin
  MFC after:    1 week
  Sponsored by: Sandvine Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@277859 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/mountd/mountd.c
usr.sbin/rpc.lockd/lockd.c
usr.sbin/rpc.statd/statd.c