summaryrefslogtreecommitdiff
path: root/ospf6d
diff options
context:
space:
mode:
authorDavid Ward <david.ward@ll.mit.edu>2010-01-05 02:45:39 +0000
committerGreg Troxel <gdt@ir.bbn.com>2010-04-28 19:30:17 -0400
commit2470e99e828c098d2d03f8d693853cbe69e3fb6f (patch)
tree19e1526814455301a244af928fe2c3d553ec3100 /ospf6d
parent85c4968bb1432ddc7c059893fdee2c976bbee937 (diff)
ospf6d: Fix crash when '[no] ipv6 ospf6 advertise prefix-list' is in startup-config
* ospf6_interface.c: When '[no] ipv6 ospf6 advertise prefix-list' appears in the startup configuration for ospf6d, a crash occurs, because ospf6d attempts to schedule LSAs when the 'oi->area' structure has not yet been initialized. Now, when the command above is issued (either in the startup configuration or at runtime), ospf6d will only schedule LSAs if the 'oi->area' structure has been initalized. A similar test is already used when handling the commands 'ipv6 ospf6 priority' and 'ipv6 ospf6 cost'.
Diffstat (limited to 'ospf6d')
-rw-r--r--ospf6d/ospf6_interface.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c
index 777bc7c9..cb347451 100644
--- a/ospf6d/ospf6_interface.c
+++ b/ospf6d/ospf6_interface.c
@@ -1394,13 +1394,17 @@ DEFUN (ipv6_ospf6_advertise_prefix_list,
oi->plist_name = XSTRDUP (MTYPE_PREFIX_LIST_STR, argv[0]);
ospf6_interface_connected_route_update (oi->interface);
- OSPF6_LINK_LSA_SCHEDULE (oi);
- if (oi->state == OSPF6_INTERFACE_DR)
+
+ if (oi->area)
{
- OSPF6_NETWORK_LSA_SCHEDULE (oi);
- OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (oi);
+ OSPF6_LINK_LSA_SCHEDULE (oi);
+ if (oi->state == OSPF6_INTERFACE_DR)
+ {
+ OSPF6_NETWORK_LSA_SCHEDULE (oi);
+ OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (oi);
+ }
+ OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB (oi->area);
}
- OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB (oi->area);
return CMD_SUCCESS;
}
@@ -1433,13 +1437,17 @@ DEFUN (no_ipv6_ospf6_advertise_prefix_list,
}
ospf6_interface_connected_route_update (oi->interface);
- OSPF6_LINK_LSA_SCHEDULE (oi);
- if (oi->state == OSPF6_INTERFACE_DR)
+
+ if (oi->area)
{
- OSPF6_NETWORK_LSA_SCHEDULE (oi);
- OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (oi);
+ OSPF6_LINK_LSA_SCHEDULE (oi);
+ if (oi->state == OSPF6_INTERFACE_DR)
+ {
+ OSPF6_NETWORK_LSA_SCHEDULE (oi);
+ OSPF6_INTRA_PREFIX_LSA_SCHEDULE_TRANSIT (oi);
+ }
+ OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB (oi->area);
}
- OSPF6_INTRA_PREFIX_LSA_SCHEDULE_STUB (oi->area);
return CMD_SUCCESS;
}