]> git.proxmox.com Git - mirror_frr.git/commitdiff
[zebra] Fix crash in test_zebra
authorPaul Jakma <paul.jakma@sun.com>
Sat, 19 Apr 2008 23:31:57 +0000 (00:31 +0100)
committerPaul Jakma <paul@quagga.net>
Tue, 28 Jul 2009 15:24:19 +0000 (16:24 +0100)
* 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.

zebra/kernel_null.c

index 94b7b3c74e856d5c073261ce93c6fddffb92581c..6b96c6df1ee39bf533368e91d7add74059a4a427 100644 (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);