Skip to content

Commit

Permalink
dcache-xroot: do not publish link local address for door
Browse files Browse the repository at this point in the history
Motivation:

Checksum on xrdcp is failing because the pool
is given a link local address by the door to use
to redirect the client back.

See:  LinkLocal addresses used by xroot checksum redirection (failing xroot uploads)
#6884

The code introduced by https://rb.dcache.org/r/13491/
serves up the first address in the list returned
by the NetworkUtils call, but this is sometimes
the link local address.

Modification:

Explicitly exclude link local and loopback addresses
from the publishable door addresses.

Result:

`xrdcp --cksum` works again.

Target: master
Request: 8.2
Closes: #6884
Requires-notes: yes
Patch: https://rb.dcache.org/r/13798/
Acked-by: Dmitry
  • Loading branch information
alrossi committed Nov 29, 2022
1 parent 0077eee commit c1d972d
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -439,9 +439,12 @@ public void getInfo(PrintWriter pw) {
public Optional<InetSocketAddress> publicEndpoint() {
return _loginBrokerInfo.flatMap(i -> {
List<InetAddress> addresses = i.getAddresses();
return addresses.isEmpty()
? Optional.empty()
: Optional.of(new InetSocketAddress(addresses.get(0), i.getPort()));
for (InetAddress addr : addresses) {
if (!addr.isLinkLocalAddress() && !addr.isLoopbackAddress()) {
return Optional.of(new InetSocketAddress(addr, i.getPort()));
}
}
return Optional.empty();
});
}

Expand Down

0 comments on commit c1d972d

Please sign in to comment.