diff options
Diffstat (limited to 'server/TetherController.cpp')
| -rw-r--r-- | server/TetherController.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/server/TetherController.cpp b/server/TetherController.cpp index 93110e0d..fbee5a2f 100644 --- a/server/TetherController.cpp +++ b/server/TetherController.cpp @@ -31,6 +31,7 @@ #include <cutils/log.h> #include <cutils/properties.h> +#include "NetdConstants.h" #include "TetherController.h" TetherController::TetherController() { @@ -273,6 +274,10 @@ int TetherController::applyDnsInterfaces() { int TetherController::tetherInterface(const char *interface) { ALOGD("tetherInterface(%s)", interface); + if (!isIfaceName(interface)) { + errno = ENOENT; + return -1; + } mInterfaces->push_back(strdup(interface)); if (applyDnsInterfaces()) { |
