From 6e7d13ba522c1e0cc411e5d6318598bff924be2d Mon Sep 17 00:00:00 2001 From: zhanglianghy Date: Wed, 7 Aug 2019 14:55:53 +0800 Subject: [PATCH] =?UTF-8?q?MOD=20aaa-12=20=E6=A1=A5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=87=AA=E6=B5=8B=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3,?= =?UTF-8?q?=E6=A1=A5=E6=8E=A5=E5=8F=A3=E5=88=9B=E5=BB=BA=E4=B9=8B=E5=90=8E?= =?UTF-8?q?=E8=87=AA=E5=8A=A8up=20SOL=20=20=E6=A1=A5=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=87=AA=E6=B5=8B=E9=97=AE=E9=A2=98=E8=A7=A3=E5=86=B3=20?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=BA=EF=BC=9Azhangliang=20=E6=A3=80?= =?UTF-8?q?=E8=A7=86=E4=BA=BA=EF=BC=9Azhangliang?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Platform/user/configm/config-server/include/netconfig.h | 2 +- .../user/configm/config-server/netconfig/bridge/brconfig.c | 6 +++++- Platform/user/configm/config-server/netconfig/netmain.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/Platform/user/configm/config-server/include/netconfig.h b/Platform/user/configm/config-server/include/netconfig.h index a7ea8ce78..727779e88 100644 --- a/Platform/user/configm/config-server/include/netconfig.h +++ b/Platform/user/configm/config-server/include/netconfig.h @@ -7,6 +7,6 @@ ret_code if_ioctl(unsigned long request, caddr_t ifreq, int *ret); ret_code if_set_up(char *ifname, int *code); ret_code if_set_down(char *ifname, int *code); -int net_main(); +ret_code net_main(); #endif diff --git a/Platform/user/configm/config-server/netconfig/bridge/brconfig.c b/Platform/user/configm/config-server/netconfig/bridge/brconfig.c index a26ff4ec1..e08d5e05f 100644 --- a/Platform/user/configm/config-server/netconfig/bridge/brconfig.c +++ b/Platform/user/configm/config-server/netconfig/bridge/brconfig.c @@ -329,7 +329,9 @@ ret_code br_bridge_add(char *br_name, int *sys_err) { return RET_SYSERR; } - + + if_set_up(br_name, sys_err); + br_invoke_event(BR_CREATE_EVENT, event_arg); br_save_file(BR_CREATE_EVENT, br_name, NULL); @@ -344,6 +346,8 @@ ret_code br_bridge_del(char * br_name, int *sys_err) br_invoke_event(BR_DELETE_EVENT_PRE, event_arg); + if_set_down(br_name, sys_err); + sys_ret = br_del_bridge(br_name); *sys_err = sys_ret; diff --git a/Platform/user/configm/config-server/netconfig/netmain.c b/Platform/user/configm/config-server/netconfig/netmain.c index 88cd44c8a..5d989c5a8 100644 --- a/Platform/user/configm/config-server/netconfig/netmain.c +++ b/Platform/user/configm/config-server/netconfig/netmain.c @@ -2,7 +2,7 @@ #include "netconfig.h" -int net_main() +ret_code net_main() { br_bridge_init(); }