Increase the valid name of the iface to IFNAMSIZ
Define MAX_IFACE_LENGTH as IFNAMSIZ instead of 10, to
prevent netd from treating an interface name 'rmnet_sdio0'
as invalid.
Also fix an off-by-one error.
Change-Id: If6b2b27d2da6eb72f01c090cbe4f7dc2b9c296ae
diff --git a/NatController.cpp b/NatController.cpp
index bdbc429..b68e4bf 100644
--- a/NatController.cpp
+++ b/NatController.cpp
@@ -87,7 +87,7 @@
}
bool NatController::checkInterface(const char *iface) {
- if (strlen(iface) > MAX_IFACE_LENGTH) return false;
+ if (strlen(iface) > IFNAMSIZ) return false;
return true;
}