[zebra] Fix crash in test_zebra

* kernel_null.c: we're pretending to add an address, so
  set IFC_REAL. If this isn't done, calling into the 'got address
  from kernel' half of zebra will implicitly-withdraw the ifc, which
  could cause a crash in test_zebra.c.
This commit is contained in:
Paul Jakma 2008-04-20 00:31:57 +01:00 committed by Paul Jakma
parent 9afabaf048
commit cb9e0ceec9

View File

@ -22,6 +22,7 @@ int kernel_add_route (struct prefix_ipv4 *a, struct in_addr *b, int c, int d)
int kernel_address_add_ipv4 (struct interface *a, struct connected *b)
{
zlog_debug ("%s", __func__);
SET_FLAG (b->conf, ZEBRA_IFC_REAL);
connected_add_ipv4 (a, 0, &b->address->u.prefix4, b->address->prefixlen,
(b->destination ? &b->destination->u.prefix4 : NULL),
NULL);