Check RouteInfo type in NetUtils#selectBestRoute

Change #selectBestRoute to account for non-unicast routes.
Method is used to detect if the address is reachable and via which
gateway. From that point of view, address being best matched by
a non-unicast route is equivalent to the address not being matched by
any route at all.

Method's implementation is adjusted to reflect the above logic. This
allows to avoid changing method's usages.

Bug: 186082280
Test: atest NetworkStaticLibTests:NetUtilsTest
Change-Id: I03f19d611fd8c7019cf13062bbeb1662d41402f4
2 files changed
tree: 377cae2b4a1cab5f7dc642afff5510a02df8045f
  1. client-libs/
  2. common/
  3. .gitignore
  4. OWNERS
  5. PREUPLOAD.cfg
  6. TEST_MAPPING