Warner Losh 923dd9a7a7 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
2010-02-09 18:10:56 +00:00
..
2010-01-21 21:14:28 +00:00
2010-01-15 16:01:22 +00:00
2009-01-30 15:28:56 +00:00
2009-11-02 12:35:38 +00:00
2009-04-28 20:20:13 +00:00
2009-01-06 14:23:38 +00:00
2009-05-29 22:19:45 +00:00
2010-01-03 22:29:06 +00:00
2010-01-16 12:20:26 +00:00
2010-01-03 15:32:25 +00:00
2010-01-15 16:01:22 +00:00
2010-01-09 15:37:24 +00:00
2010-01-10 19:21:23 +00:00