summaryrefslogtreecommitdiff
path: root/src/lbdatafactory.cc
diff options
context:
space:
mode:
authorEwald van Geffen <ewald@abcdef.be>2016-05-22 01:02:07 +0200
committerEwald van Geffen <ewald@abcdef.be>2016-05-22 01:02:07 +0200
commiteec6443e2dbfed079b295a5d60fd08cf80aad698 (patch)
tree4e2b3fefe33b084ca816f55e544210a14c771a72 /src/lbdatafactory.cc
parenta85fc2d5ed4e9412c47446645c6e2c7aedb9e92e (diff)
downloadvyatta-wanloadbalance-eec6443e2dbfed079b295a5d60fd08cf80aad698.tar.gz
vyatta-wanloadbalance-eec6443e2dbfed079b295a5d60fd08cf80aad698.zip
- Bug 363 support for post-hook: allows to run script once route/firewall change have been applied.
Diffstat (limited to 'src/lbdatafactory.cc')
-rw-r--r--src/lbdatafactory.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lbdatafactory.cc b/src/lbdatafactory.cc
index bf49b36..6870737 100644
--- a/src/lbdatafactory.cc
+++ b/src/lbdatafactory.cc
@@ -157,6 +157,9 @@ LBDataFactory::process(const vector<string> &path, int depth, const string &key,
else if (path[0] == "hook") {
process_hook(l_key,l_value);
}
+ else if (path[0] == "post-hook") {
+ process_post_hook(l_key,l_value);
+ }
else if (path[0] == "health") {
if (depth == 2 && key == "interface") {
process_health(l_key,l_value);
@@ -250,6 +253,14 @@ LBDataFactory::process_hook(const string &key, const string &value)
}
void
+LBDataFactory::process_post_hook(const string &key, const string &value)
+{
+ if (value.empty() == false) {
+ _lb_data._post_hook = value;
+ }
+}
+
+void
LBDataFactory::process_health(const string &key, const string &value)
{
if (value.empty() == false) {