Remove gateway if HNA 0/0 or originators TC is removed
[olsrd.git] / src / tc_set.c
index c227955..9cf22a0 100644 (file)
@@ -53,6 +53,7 @@
 #include "lq_plugin.h"
 #include "olsr_cookie.h"
 #include "duplicate_set.h"
+#include "gateway.h"
 
 #include <assert.h>
 
@@ -284,6 +285,9 @@ olsr_delete_tc_entry(struct tc_entry *tc)
   OLSR_PRINTF(1, "TC: del entry %s\n", olsr_ip_to_string(&buf, &tc->addr));
 #endif
 
+  /* delete gateway if available */
+  olsr_delete_gateway(&tc->addr);
+
   /*
    * Delete the rt_path for ourselves.
    */