shill: connection: Fix IP address comparison in FixGatewayReachability

CL:247030 inadvertently broke IP address comparison for
Connection::FixGatewayReachability, since now the |trusted_ip|
contains a prefix while the |peer| and |gateway| still do not.
To solve this, add a new comparison method for IPAddress objects
that does not consider the prefix, and use this for address
comparisons in Connection::FixGatewayReachability.

BUG=chromium:478267
TEST=Unit test + create an ipvanish account and connect

Change-Id: Id30e0cd15bb0171c7f438cf1e7f0087c75d55611
Originally-Reviewed-on: https://chromium-review.googlesource.com/268970
(cherry picked from commit 08e9305b5ffaccd5885f871d76a17b33dbcc474b)
Reviewed-on: https://chromium-review.googlesource.com/269164
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
5 files changed