]> CyberLeo.Net >> Repos - FreeBSD/stable/8.git/commit
MFC r203710:
authorimp <imp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 13 Apr 2010 00:48:54 +0000 (00:48 +0000)
committerimp <imp@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 13 Apr 2010 00:48:54 +0000 (00:48 +0000)
commitd961105cfc219b36b09530f3d0faf6130921ee1f
tree6b946b8075166abc8663ab3559942b19eddb529c
parentacf160ab1002db95e74ca03ea9a693f037ac73c4
MFC r203710:

  When you have multiple addresses on the same network on different
  interfaces (such as when you are part of a carp pool), and you run
  rpcbind -h to restrict which interfaces have rpc services, rpcbind can
  none-the-less return addresses that aren't in the -h list.  This patch
  enforces the rule that when you specify -h on the command line, then
  services returned from rpcbind must be to one of the addresses listed
  in -h, or be a loopback address (since localhost is implicit when
  running -h).

  The root cause of this is the assumption in addrmerge that there can
  be only one interface that matches a given network IP address.  This
  turns out not to be the case.  To retain historical behavior, I didn't
  try to fix the routine to prefer the address that the request came
  into, since I didn't know the side effects that might cause in the
  normal case.  My quick analysis suggests that it wouldn't be a
  problem, but since this code is tricky I opted for the more
  conservative patch of only restricting the reply when -h is in effect.

  Hence, this change will have no effect when you are running rpcbind
  without -h.

  Reviewed by: alfred@
  Sponsored by: iX Systems
  MFC after: 2 weeks

git-svn-id: svn://svn.freebsd.org/base/stable/8@206535 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/rpcbind/rpcbind.c
usr.sbin/rpcbind/rpcbind.h
usr.sbin/rpcbind/util.c