summaryrefslogtreecommitdiffstats
path: root/isisd/isis_pdu.c
diff options
context:
space:
mode:
authorChristian Franke <chris@opensourcerouting.org>2015-11-10 18:04:48 +0100
committerDonald Sharp <sharpd@cumulusnetworks.com>2016-03-30 02:26:17 +0200
commitddfdbd32b42a8575fc85f237b8470d1c0b677f6b (patch)
tree4e3bdbc2bd081992232f234c9772daa20c73a7fd /isisd/isis_pdu.c
parentisisd: do remove ipv6 routes from Zebra (diff)
downloadfrr-ddfdbd32b42a8575fc85f237b8470d1c0b677f6b.tar.xz
frr-ddfdbd32b42a8575fc85f237b8470d1c0b677f6b.zip
isisd: initialize circuit to match area is_type
New circuits should be initialized to match the is_type of their area. Also add an additional check to make sure that no IIHs are sent for levels which are not enabled. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'isisd/isis_pdu.c')
-rw-r--r--isisd/isis_pdu.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c
index 3db57bca8..d9e98f268 100644
--- a/isisd/isis_pdu.c
+++ b/isisd/isis_pdu.c
@@ -2420,6 +2420,13 @@ send_lan_l1_hello (struct thread *thread)
assert (circuit);
circuit->u.bc.t_send_lan_hello[0] = NULL;
+ if (!(circuit->area->is_type & IS_LEVEL_1))
+ {
+ zlog_warn ("ISIS-Hello (%s): Trying to send L1 IIH in L2-only area",
+ circuit->area->area_tag);
+ return 1;
+ }
+
if (circuit->u.bc.run_dr_elect[0])
retval = isis_dr_elect (circuit, 1);
@@ -2443,6 +2450,13 @@ send_lan_l2_hello (struct thread *thread)
assert (circuit);
circuit->u.bc.t_send_lan_hello[1] = NULL;
+ if (!(circuit->area->is_type & IS_LEVEL_2))
+ {
+ zlog_warn ("ISIS-Hello (%s): Trying to send L2 IIH in L1 area",
+ circuit->area->area_tag);
+ return 1;
+ }
+
if (circuit->u.bc.run_dr_elect[1])
retval = isis_dr_elect (circuit, 2);