author | kejun.gao <kejun.gao@amlogic.com> | 2014-10-30 14:54:22 (GMT) |
---|---|---|
committer | Sandy lUo <sandy.luo@amlogic.com> | 2014-11-04 09:40:20 (GMT) |
commit | 89d1fbed1339a98f3ae01c35b7274a0f33c6bbde (patch) | |
tree | 9638774e0d54912e04d464fe41fb92668ea65248 | |
parent | 763576612d16b2044ca8199a111c947f6ff3b13a (diff) | |
download | pppoe-89d1fbed1339a98f3ae01c35b7274a0f33c6bbde.zip pppoe-89d1fbed1339a98f3ae01c35b7274a0f33c6bbde.tar.gz pppoe-89d1fbed1339a98f3ae01c35b7274a0f33c6bbde.tar.bz2 |
PD#98924. Clear ethernet ip address before PPPoE
Change-Id: I663de4e458ec8b91429e09c1a42c6776c56aaa5f
-rwxr-xr-x | jni/src/pppoe_wrapper.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/jni/src/pppoe_wrapper.c b/jni/src/pppoe_wrapper.c index 3b93a5a..800f9e4 100755 --- a/jni/src/pppoe_wrapper.c +++ b/jni/src/pppoe_wrapper.c @@ -24,6 +24,8 @@ #include <sys/un.h> #include <android/log.h> +#include <netutils/ifc.h> + #include <netwrapper.h> #include "pppoe_status.h" @@ -119,6 +121,14 @@ static int pppoe_terminate_handler(char *request) static int pppoe_connect_handler(char *request) { + if (strstr(request, "eth0")) { + __android_log_print(ANDROID_LOG_INFO, LOCAL_TAG, + "FIXME!!! SHOULD NOT clear eth0 ip address. Reference to bug#98924.\n"); + ifc_init(); + ifc_set_addr("eth0",0); + ifc_close(); + } + return system(request); } |