freebsd-nq/usr.sbin
Alan Somers a85f12322c "source routing" in rpcbind
Fix a bug in rpcbind for multihomed hosts. If the server had interfaces on
two separate subnets, and a client on the first subnet contacted rpcbind at
the address on the second subnet, rpcbind would advertise addresses on the
first subnet. This is a bug, because it should prefer to advertise the
address where it was contacted. The requested service might be firewalled
off from the address on the first subnet, for example.

usr.sbin/rpcbind/check_bound.c
	If the address on which a request was received is known, pass that
	to addrmerge as the clnt_uaddr parameter. That is what addrmerge's
	comment indicates the parameter is supposed to mean. The previous
	behavior is that clnt_uaddr would contain the address from which the
	client sent the request.

usr.sbin/rpcbind/util.c
	Modify addrmerge to prefer to use an IP that is equal to clnt_uaddr,
	if one is found. Refactor the relevant portion of the function for
	clarity, and to reduce the number of ifdefs.

etc/mtree/BSD.tests.dist
usr.sbin/rpcbind/tests/Makefile
usr.sbin/rpcbind/tests/addrmerge_test.c
	Add unit tests for usr.sbin/rpcbind/util.c:addrmerge.

usr.sbin/rpcbind/check_bound.c
usr.sbin/rpcbind/rpcbind.h
usr.sbin/rpcbind/util.c
	Constify some function arguments

Reviewed by:	imp
MFC after:	4 weeks
Sponsored by:	Spectra Logic Corp
Differential Revision:	https://reviews.freebsd.org/D4690
2016-01-06 00:00:11 +00:00
..
ac Add META_MODE support. 2015-06-13 19:20:56 +00:00
accton Add META_MODE support. 2015-06-13 19:20:56 +00:00
acpi META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
adduser Add META_MODE support. 2015-06-13 19:20:56 +00:00
amd META MODE: Remove bin/cat.host dependency. 2015-11-25 18:37:42 +00:00
ancontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
apm Add META_MODE support. 2015-06-13 19:20:56 +00:00
apmd META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
arp rtsock requests for deleting interface address lles started to return EPERM 2015-09-27 04:54:29 +00:00
asf Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
audit Add META_MODE support. 2015-06-13 19:20:56 +00:00
auditd Add META_MODE support. 2015-06-13 19:20:56 +00:00
auditdistd META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
auditreduce Add META_MODE support. 2015-06-13 19:20:56 +00:00
authpf Add META_MODE support. 2015-06-13 19:20:56 +00:00
autofs META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
bhyve Remove unused variable after r292981 to unbreak the build. 2015-12-31 10:55:50 +00:00
bhyvectl META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
bhyveload META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
binmiscctl META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
bluetooth Fix scancodes for Kana and Eisu keys. 2015-11-21 21:14:16 +00:00
boot0cfg Fix the precious change to check the pointer returned by malloc(). 2015-12-18 17:52:08 +00:00
boot98cfg META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
bootparamd Fix some trivial warnings with bootparamd/main.c 2015-11-10 11:19:36 +00:00
bsdconfig META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
bsdinstall Merge ^/projects/release-install-debug: 2016-01-05 21:05:17 +00:00
bsnmpd META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
btxld Add META_MODE support. 2015-06-13 19:20:56 +00:00
camdd Clean up unused-but-set-variable spotted by gcc-4.9. 2015-12-31 01:57:55 +00:00
cdcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
chkgrp Revert r286148 2015-08-01 10:40:17 +00:00
chown Add META_MODE support. 2015-06-13 19:20:56 +00:00
chroot Add META_MODE support. 2015-06-13 19:20:56 +00:00
ckdist Add META_MODE support. 2015-06-13 19:20:56 +00:00
clear_locks Add META_MODE support. 2015-06-13 19:20:56 +00:00
config Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
cpucontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
crashinfo Add META_MODE support. 2015-06-13 19:20:56 +00:00
cron Add sbin and /usr/local directories to _PATH_DEFPATH. 2016-01-05 16:21:20 +00:00
crunch crunchide: add RISC-V to supported machine types 2015-12-11 13:55:31 +00:00
ctladm Add to CTL initial support for CDROMs and removable devices. 2015-09-27 13:47:28 +00:00
ctld META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
ctm Flesh out the SEE ALSO section. 2015-12-14 15:44:34 +00:00
daemon Add META_MODE support. 2015-06-13 19:20:56 +00:00
dconschat Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
devctl META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
devinfo Add META_MODE support. 2015-06-13 19:20:56 +00:00
digictl Add META_MODE support. 2015-06-13 19:20:56 +00:00
diskinfo Add META_MODE support. 2015-06-13 19:20:56 +00:00
dumpcis Add META_MODE support. 2015-06-13 19:20:56 +00:00
editmap META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
edquota Add META_MODE support. 2015-06-13 19:20:56 +00:00
eeprom META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
etcupdate Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
extattr Add META_MODE support. 2015-06-13 19:20:56 +00:00
extattrctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
fdcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
fdformat Add META_MODE support. 2015-06-13 19:20:56 +00:00
fdread Add META_MODE support. 2015-06-13 19:20:56 +00:00
fdwrite Add META_MODE support. 2015-06-13 19:20:56 +00:00
fifolog For INTERNALLIB always add in the corresponding _DP_ and use LIBADD in 2015-12-04 03:17:17 +00:00
flowctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
fmtree Rename usr.sbin/mtree to usr.sbin/fmtree since it is not what /usr/sbin/mtree 2015-11-09 23:19:36 +00:00
freebsd-update Add debug file extension to freebsd-update(8) after r288176 2015-10-15 01:48:52 +00:00
fstyp Eliminate unneeded includes. 2015-12-28 08:53:31 +00:00
ftp-proxy META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
fwcontrol Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
getfmac Add META_MODE support. 2015-06-13 19:20:56 +00:00
getpmac Add META_MODE support. 2015-06-13 19:20:56 +00:00
gpioctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
gssd Unset the gss kernel state when gssd exits 2016-01-01 17:06:16 +00:00
gstat Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
hyperv META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
i2c Perform I2C transmission in a single burst when mode is "none" or not set 2015-09-15 11:21:16 +00:00
ifmcstat Add META_MODE support. 2015-06-13 19:20:56 +00:00
inetd - Remove unused union p_un. 2015-09-19 23:48:06 +00:00
iostat When iostat(8) receives SIGINT while running with "-w" or "-c", it will now 2015-12-09 18:07:26 +00:00
iovctl META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
ip6addrctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
ipfwpcap Add META_MODE support. 2015-06-13 19:20:56 +00:00
iscsid META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
jail Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
jexec Run a shell in the jail when no command is specified. 2015-07-12 17:03:50 +00:00
jls Add libxo support to jls 2015-12-22 00:58:35 +00:00
kbdcontrol kbdmap.5: Use current names for ASCII control codes lf, ff, us 2016-01-02 18:35:11 +00:00
kbdmap kbdmap: include filename when reporting fopen() failure 2015-11-27 21:27:39 +00:00
keyserv Add META_MODE support. 2015-06-13 19:20:56 +00:00
kgmon Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
kgzip META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
kldxref Augment kldxref to find the new MODULE_PNP_INFO records now in 2015-12-11 05:27:55 +00:00
lastlogin Add META_MODE support. 2015-06-13 19:20:56 +00:00
lmcconfig Add META_MODE support. 2015-06-13 19:20:56 +00:00
lpr Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
lptcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
mailstats META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
mailwrapper Add META_MODE support. 2015-06-13 19:20:56 +00:00
makefs Fix getopt(3) argument after r290180; I forgot to change -r to -R 2015-12-29 20:17:40 +00:00
makemap META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
manctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
memcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
mergemaster All supported releases have the -m support from r186678, so remove 2015-09-29 17:54:01 +00:00
mfiutil Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
mixer Add META_MODE support. 2015-06-13 19:20:56 +00:00
mld6query Add META_MODE support. 2015-06-13 19:20:56 +00:00
mlxcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
mount_smbfs META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
mountd Fix type mismatches for malloc(3) and Co. 2015-12-29 11:24:41 +00:00
moused Add META_MODE support. 2015-06-13 19:20:56 +00:00
mpsutil Fix type mismatches for malloc(3) and Co. 2015-12-29 11:24:41 +00:00
mptable Stop suggesting -grope argument when -grope argument was actually given 2015-10-22 21:13:35 +00:00
mptutil Add META_MODE support. 2015-06-13 19:20:56 +00:00
mtest Add META_MODE support. 2015-06-13 19:20:56 +00:00
nandsim META MODE: Connect MK_NAND directories. 2015-12-02 05:31:01 +00:00
nandtool META MODE: Connect MK_NAND directories. 2015-12-02 05:31:01 +00:00
ndiscvt Remove unneeded NAME override. 2015-10-27 23:35:08 +00:00
ndp Fix indent after r292333. 2015-12-19 09:18:01 +00:00
newsyslog newsyslog: treat 'c' flag in the config as 'C' 2015-10-31 09:45:11 +00:00
nfscbd Add META_MODE support. 2015-06-13 19:20:56 +00:00
nfsd Add META_MODE support. 2015-06-13 19:20:56 +00:00
nfsdumpstate Add META_MODE support. 2015-06-13 19:20:56 +00:00
nfsrevoke Add META_MODE support. 2015-06-13 19:20:56 +00:00
nfsuserd Document the new "-manage-gids" option for the nfsuserd daemon. 2015-11-30 22:16:30 +00:00
ngctl ngctl dot: Drop invalid trailing semi-colon 2015-09-22 01:31:01 +00:00
nghook Add META_MODE support. 2015-06-13 19:20:56 +00:00
nmtree Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
nologin new depends 2015-06-16 23:37:19 +00:00
nscd Add META_MODE support. 2015-06-13 19:20:56 +00:00
ntp META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
nvram use .Mt to mark up email addresses consistently (part2) 2014-06-20 09:57:27 +00:00
ofwdump DIRDEPS_BUILD: Update dependencies. 2015-12-07 23:53:01 +00:00
pc-sysinstall Add more SUBDIR_PARALLEL. 2015-09-26 14:13:51 +00:00
pciconf Add a new -B flag for use with list mode (-l) that lists details about 2015-11-23 23:48:07 +00:00
periodic Add META_MODE support. 2015-06-13 19:20:56 +00:00
pkg Remove extra debug that crept in 2015-09-08 22:24:20 +00:00
pmcannotate Add META_MODE support. 2015-06-13 19:20:56 +00:00
pmccontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
pmcstat Fix the date on the pmcstat(8) man page from r291016. 2015-11-18 15:12:24 +00:00
pmcstudy Fix several typos and bugs within pmcstudy. Also highlight the one SB test 2015-12-10 01:52:29 +00:00
pnpinfo META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
portsnap Add META_MODE support. 2015-06-13 19:20:56 +00:00
powerd Add META_MODE support. 2015-06-13 19:20:56 +00:00
ppp Fix a ton of speelling errors 2015-10-21 05:37:09 +00:00
pppctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
praliases META MODE: Don't create .meta files when symlinking sources into the obj directory. 2015-11-25 19:44:43 +00:00
praudit Add META_MODE support. 2015-06-13 19:20:56 +00:00
procctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
pstat Update dependencies after r291406 added libelf to libkvm. 2015-12-01 05:18:48 +00:00
pw Simplify code for parsing extra groups 2015-12-29 00:08:32 +00:00
pwd_mkdb The sdp opens the database with PERM_SECURE mode and it is different than 2015-12-28 05:48:22 +00:00
quot Add META_MODE support. 2015-06-13 19:20:56 +00:00
quotaon Add META_MODE support. 2015-06-13 19:20:56 +00:00
rarpd Add META_MODE support. 2015-06-13 19:20:56 +00:00
repquota Add META_MODE support. 2015-06-13 19:20:56 +00:00
rip6query Add META_MODE support. 2015-06-13 19:20:56 +00:00
rmt Add META_MODE support. 2015-06-13 19:20:56 +00:00
route6d Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.lockd Fix type mismatches for malloc(3) and Co. 2015-12-29 11:24:41 +00:00
rpc.statd Fix type mismatches for malloc(3) and Co. 2015-12-29 11:24:41 +00:00
rpc.umntall Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.yppasswdd Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
rpc.ypupdated Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpc.ypxfrd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rpcbind "source routing" in rpcbind 2016-01-06 00:00:11 +00:00
rrenumd Add META_MODE support. 2015-06-13 19:20:56 +00:00
rtadvctl Add META_MODE support. 2015-06-13 19:20:56 +00:00
rtadvd Use strlcpy(). 2015-10-30 00:33:03 +00:00
rtprio Add META_MODE support. 2015-06-13 19:20:56 +00:00
rtsold Fix type mismatches for malloc(3) and Co. 2015-12-29 11:24:41 +00:00
rwhod Add META_MODE support. 2015-06-13 19:20:56 +00:00
sa Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
sendmail Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
service Add an additional check to service(8) -e incase rcvar is blank 2015-09-08 22:50:17 +00:00
services_mkdb Add META_MODE support. 2015-06-13 19:20:56 +00:00
sesutil Show the enclosure name and id in sesutil map 2015-12-15 13:01:14 +00:00
setfib Add META_MODE support. 2015-06-13 19:20:56 +00:00
setfmac Add META_MODE support. 2015-06-13 19:20:56 +00:00
setpmac Add META_MODE support. 2015-06-13 19:20:56 +00:00
sicontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
smbmsg Add META_MODE support. 2015-06-13 19:20:56 +00:00
snapinfo Add META_MODE support. 2015-06-13 19:20:56 +00:00
spkrtest Add META_MODE support. 2015-06-13 19:20:56 +00:00
spray Add META_MODE support. 2015-06-13 19:20:56 +00:00
syslogd Have syslogd honor 'mesg' status when logging to users. 2015-11-25 20:01:11 +00:00
sysrc META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
tcpdchk Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
tcpdmatch Use LIBEXECDIR for /usr/libexec. 2015-11-26 01:14:40 +00:00
tcpdrop Add META_MODE support. 2015-06-13 19:20:56 +00:00
tcpdump MFV r285191: tcpdump 4.7.4. 2015-07-08 16:19:32 +00:00
tests Refactor the test/ Makefiles after recent changes to bsd.test.mk (r289158) and 2015-10-12 08:16:03 +00:00
timed Add META_MODE support. 2015-06-13 19:20:56 +00:00
traceroute Add META_MODE support. 2015-06-13 19:20:56 +00:00
traceroute6 Add META_MODE support. 2015-06-13 19:20:56 +00:00
trpt Check and fail if drop of privileges failed. 2015-09-01 06:32:02 +00:00
tzsetup Revert r289269 for now. After looking at share/zoneinfo/Makefile this could 2015-10-27 01:26:50 +00:00
uathload Document why we use -z nonexecstack in the Makefile since it 2015-11-21 16:37:11 +00:00
uefisign META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
ugidfw Add META_MODE support. 2015-06-13 19:20:56 +00:00
uhsoctl Prevent use-after-free with ctx->ns in set_nameservers(..), which could occur 2015-12-22 05:57:23 +00:00
unbound META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
usbconfig Add META_MODE support. 2015-06-13 19:20:56 +00:00
usbdump Add META_MODE support. 2015-06-13 19:20:56 +00:00
utx Add META_MODE support. 2015-06-13 19:20:56 +00:00
vidcontrol Add META_MODE support. 2015-06-13 19:20:56 +00:00
vigr META MODE: Update dependencies with 'the-lot' and add missing directories. 2015-12-01 05:23:19 +00:00
vipw Add META_MODE support. 2015-06-13 19:20:56 +00:00
wake Fix a few mandoc warnings. 2015-08-12 10:34:05 +00:00
watch Use strlcpy() when the string is expected to be nul-terminated. 2015-10-06 22:49:25 +00:00
watchdogd Add a new exit-timeout option to watchdogd. 2015-08-19 21:46:12 +00:00
wlandebug Belatedly fix documentation on which interface to use as argument. 2015-08-17 09:18:54 +00:00
wlconfig META_MODE: Remove DEP_MACHINE from Makefile.depend files. 2015-09-25 19:44:01 +00:00
wpa Update hostapd/wpa_supplicant to version 2.5. 2015-10-18 21:38:25 +00:00
yp_mkdb Staticfy and constify some variables and clean up the code a bit to make it 2015-07-28 02:32:40 +00:00
ypbind Don't need cast malloc. 2015-11-16 03:18:40 +00:00
ypldap Remove a garbage printf used for debug. 2015-12-15 15:46:14 +00:00
yppoll Update META_MODE dependencies. 2015-09-17 05:06:34 +00:00
yppush Staticfy and constify some variables and clean up the code a bit to make it 2015-07-28 02:32:40 +00:00
ypserv Generate ipnodes.by{addr,name} from /etc/hosts for compatibility with 2015-12-18 17:30:22 +00:00
ypset Rename YP to NIS in the manpages. 2015-09-03 07:18:52 +00:00
zic Use more appropriate ${SHAREDIR} rather than /usr/share. 2015-10-27 23:35:02 +00:00
zzz Add META_MODE support. 2015-06-13 19:20:56 +00:00
Makefile Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00
Makefile.amd64 Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00
Makefile.arm Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00
Makefile.arm64 arm64: build usr.sbin/acpi subdirectory 2015-11-08 20:56:04 +00:00
Makefile.i386 Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00
Makefile.inc
Makefile.mips Document why we use -z nonexecstack in the Makefile since it 2015-11-21 16:37:11 +00:00
Makefile.powerpc Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00
Makefile.sparc64 Make the building of libsmb and mount_smbfs unconditional, now that r292552 2015-12-21 17:41:08 +00:00