]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
RPCBIND: skip ipv6 link local when request is not from link local address
authorDavid Bright <dab@FreeBSD.org>
Mon, 4 Oct 2021 15:43:41 +0000 (08:43 -0700)
committerDavid Bright <dab@FreeBSD.org>
Mon, 11 Oct 2021 16:21:00 +0000 (09:21 -0700)
commite72fce241f88737592219049648d93d58f0e63eb
treeab895bad063571ec0f25b2178036c41c871f4ee8
parent7dbcef9536b410426e8b391e721e5800f5d503b5
RPCBIND: skip ipv6 link local when request is not from link local address

RPCINFO on macOS behaves different compared to other linux clients and
doesn't provide request address in rpcb structure of the
RPCBPROC_GETADDRLIST call which doesn't seem to be forbidden.

In this case RPCBIND uses RPC call's source address and picks a
closest corresponding local address. If there are no addresses in the
same subnet as the source address, return of RPCBIND may vary
depending on the order of addresses returned in getifaddrs. If a link
local precedes global address it may be returned even if the request
comes from neither a link local nor from link local in a different
scope, which will prevent services like nfs from working in tpc6
scenario on macOS clients. Issue can be seen only on FreeBSD rpcbind
port due to changes in workflow of addrmerge call.

Submitted by: Dmitry Ovsyannikov (Dmitry.Ovsyannikov@dell.com)
Sponsored by: Dell EMC

(cherry picked from commit d18c9a91979543adc182c7b28819691b64fda388)
usr.sbin/rpcbind/tests/addrmerge_test.c
usr.sbin/rpcbind/util.c