summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/ip4_fib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/fib/ip4_fib.c')
-rw-r--r--src/vnet/fib/ip4_fib.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/vnet/fib/ip4_fib.c b/src/vnet/fib/ip4_fib.c
index e8211c80d20..a7915620b37 100644
--- a/src/vnet/fib/ip4_fib.c
+++ b/src/vnet/fib/ip4_fib.c
@@ -158,8 +158,9 @@ ip4_fib_table_destroy (ip4_fib_t *fib)
/*
* remove all the specials we added when the table was created.
+ * In reverse order so the default route is last.
*/
- for (ii = 0; ii < ARRAY_LEN(ip4_specials); ii++)
+ for (ii = ARRAY_LEN(ip4_specials) - 1; ii >= 0; ii--)
{
fib_prefix_t prefix = ip4_specials[ii].ift_prefix;