[Xorp-hackers] [PATCH 2/5] xorp: policy: Fix behaviour on protocol death
igorm at etf.rs
igorm at etf.rs
Wed Apr 11 09:26:18 PDT 2012
From: Igor Maravic <igorm at etf.rs>
When protocol dies clear export and import protocol policies just like the user deleted them manually.
Old way crashed XORP when protocol was deleted, and then re-added with new export/import policies.
Signed-off-by: Igor Maravic <igorm at etf.rs>
---
xorp/policy/policy_target.cc | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/xorp/policy/policy_target.cc b/xorp/policy/policy_target.cc
index f73863b..76f6daa 100644
--- a/xorp/policy/policy_target.cc
+++ b/xorp/policy/policy_target.cc
@@ -191,8 +191,9 @@ PolicyTarget::death(const string& tclass, const string& /* tinstance */)
// Remove the "import" and "export" dependencies for the protocol
string protocol = _pmap.protocol(tclass);
- _conf.clear_imports(protocol);
- _conf.clear_exports(protocol);
+ //delete all export and import filters
+ update_export(protocol, "", "");
+ update_import(protocol, "", "");
_process_watch.death(tclass);
}
--
1.7.5.4
More information about the Xorp-hackers
mailing list