Fix a panic when trying to remove a route with the magical 0.0.0.0
destination.
looks ok to claudio@
-/* $OpenBSD: radix.c,v 1.40 2014/05/27 19:38:15 claudio Exp $ */
+/* $OpenBSD: radix.c,v 1.41 2014/07/01 09:58:40 mpi Exp $ */
/* $NetBSD: radix.c,v 1.20 2003/08/07 16:32:56 agc Exp $ */
/*
return (0);
}
- KASSERT((tt->rn_flags & RNF_ROOT) == 0);
-
/* save start of multi path chain for later use */
dupedkey_tt = tt;
#ifndef SMALL_KERNEL
/* if we got a hint use the hint from now on */
- if (rn)
+ if (rn)
tt = rn;
#endif
+ KASSERT((tt->rn_flags & RNF_ROOT) == 0);
+
/* remove possible radix_mask */
if (rn_del_radix_mask(tt))
return (0);