From: Igor Maravic <[email protected]>

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 <[email protected]>
---
 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

_______________________________________________
Xorp-hackers mailing list
[email protected]
http://mailman.ICSI.Berkeley.EDU/mailman/listinfo/xorp-hackers

Reply via email to