From: Paul Jakma Date: Sat, 19 Apr 2008 23:31:57 +0000 (+0100) Subject: [zebra] Fix crash in test_zebra X-Git-Tag: frr-2.0-rc1~2231 X-Git-Url: https://git.puffer.fish/?a=commitdiff_plain;h=cb9e0ceec988a059dd2269ebc54722c01afb7cca;p=mirror%2Ffrr.git [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. --- diff --git a/zebra/kernel_null.c b/zebra/kernel_null.c index 94b7b3c74e..6b96c6df1e 100644 --- a/zebra/kernel_null.c +++ b/zebra/kernel_null.c @@ -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);