ClatdController::ClatdTracker::init - fix tracker v4 field shadowing
What an annoying bug.
Test: atest netd_unit_test, makes stuff work...
Bug: 65674744
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: I3ca598f7c45ade0b60dacb00178bd81fd63ceab7
diff --git a/server/ClatdController.cpp b/server/ClatdController.cpp
index 142c4ca..aeaefef 100644
--- a/server/ClatdController.cpp
+++ b/server/ClatdController.cpp
@@ -205,7 +205,7 @@
// the address is only actually assigned to an interface once clatd starts up. So we could end
// up with two clatd instances with the same IPv4 address.
// Stop doing this and instead pick a free one from the kV4Addr pool.
- in_addr v4 = {selectIpv4Address(kV4Addr, kV4AddrLen)};
+ v4 = {selectIpv4Address(kV4Addr, kV4AddrLen)};
if (v4.s_addr == INADDR_NONE) {
ALOGE("No free IPv4 address in %s/%d", kV4AddrString, kV4AddrLen);
return -EADDRNOTAVAIL;