Don't service local requests.

There are security- and privacy-related issues with allowing local
processes - Chrome, for example - to access the p2p HTTP server. This
change blocks all access from the loopback interface.

BUG=chromium:309708
TEST=Unit tests pass and manually tested by running "curl
    http://${IP}:16725" and checking that the connection is refused
    for IP being 127.0.0.1 and an IP address assigned to one of the
    interfaces.

Change-Id: I75d6bbf37e3e242fef8bca3b207fafcb1e67e957
Reviewed-on: https://chromium-review.googlesource.com/174396
Reviewed-by: Jorge Lucangeli Obes <jorgelo@chromium.org>
Commit-Queue: David Zeuthen <zeuthen@chromium.org>
Tested-by: David Zeuthen <zeuthen@chromium.org>
1 file changed