{
struct proto_shell_state *state;
struct proto_shell_handler *handler;
- const char *argv[5];
+ const char *argv[6];
char *config;
int ret;
argv[2] = "teardown";
argv[3] = config;
argv[4] = NULL;
+ if (proto->iface->main_dev.dev) {
+ argv[4] = proto->iface->main_dev.dev->ifname;
+ argv[5] = NULL;
+ }
switch(cmd) {
case PROTO_CMD_SETUP:
proto="$1"
cmd="$2"
data="$3"
+ifname="$4"
case "$cmd" in
dump)
[[ "$proto" == "$1" ]] || return 0
case "$cmd" in
- setup) eval "$1_setup \"\$data\"" ;;
- teardown) eval "$1_teardown \"\$data\"" ;;
+ setup) eval "$1_setup \"\$data\" \"\$ifname\"" ;;
+ teardown) eval "$1_teardown \"\$data\" \"\$ifname\"" ;;
*) return 1 ;;
esac
}