diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-10-18 03:32:21 +0200 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-10-18 03:32:21 +0200 |
commit | 412e341def88b0734fbac2c2f19fcecf2486ee86 (patch) | |
tree | f4050b542181869766dbb437ed06ec08cde1f3cb /src/options.c | |
parent | df48485aeab897c50fd792a740d1a5aed4378fc9 (diff) | |
download | fastd-412e341def88b0734fbac2c2f19fcecf2486ee86.tar fastd-412e341def88b0734fbac2c2f19fcecf2486ee86.zip |
config: make on_up/down/establish/disestablish commands configurable per peer group
Diffstat (limited to 'src/options.c')
-rw-r--r-- | src/options.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/options.c b/src/options.c index 811adef..17a6abb 100644 --- a/src/options.c +++ b/src/options.c @@ -50,6 +50,7 @@ #include "fastd.h" #include "config.h" #include "peer.h" +#include "peer_group.h" #include <fastd_version.h> #include <arpa/inet.h> @@ -346,12 +347,12 @@ static void option_on_pre_up(const char *arg) { /** Handles the --on-up option */ static void option_on_up(const char *arg) { - fastd_shell_command_set(&conf.on_up, arg, true); + fastd_shell_command_set(&conf.peer_group->on_up, arg, true); } /** Handles the --on-down option */ static void option_on_down(const char *arg) { - fastd_shell_command_set(&conf.on_down, arg, true); + fastd_shell_command_set(&conf.peer_group->on_down, arg, true); } /** Handles the --on-post-down option */ @@ -361,17 +362,17 @@ static void option_on_post_down(const char *arg) { /** Handles the --on-connect option */ static void option_on_connect(const char *arg) { - fastd_shell_command_set(&conf.on_connect, arg, false); + fastd_shell_command_set(&conf.peer_group->on_connect, arg, false); } /** Handles the --on-establish option */ static void option_on_establish(const char *arg) { - fastd_shell_command_set(&conf.on_establish, arg, false); + fastd_shell_command_set(&conf.peer_group->on_establish, arg, false); } /** Handles the --on-disestablish option */ static void option_on_disestablish(const char *arg) { - fastd_shell_command_set(&conf.on_disestablish, arg, false); + fastd_shell_command_set(&conf.peer_group->on_disestablish, arg, false); } #ifdef WITH_DYNAMIC_PEERS |