Fix addRoute replace default route unexpectedly
In aosp/1203789, if two routes are with the same destination, it will be replaced instead of added when calling addRoute. This breaks scenarios which rely on the ability to add multiple default routes, such as multiple IPv6 default routes learned via address autoconfiguration. This change treats the route is an update if the destination and nexthop are the same, but different in other properties. Test: atest OffloadControllerTest#testSetUpstreamLinkPropertiesWorking Test: atest LinkPropertiesUtilsTest#testLinkPropertiesIdenticalEqual Test: atest ConnectivityServiceTest#testStackedLinkProperties Test: atest ConnectivityServiceTest#testRouteAddDeleteUpdate (only directly related tests are listed) Fix: 152170074 Fix: 151911339 Bug: 142892223 Change-Id: I7153ec9866f14a109ba8155c905e5d9e4f85eb64 Merged-In: I7153ec9866f14a109ba8155c905e5d9e4f85eb64 (cherry picked from commit 11aa9cb4)
Loading
Please register or sign in to comment