From a211d65dfda5ae4028ec7bb524f85f3f4bae24c2 Mon Sep 17 00:00:00 2001 From: hasso Date: Mon, 20 Sep 2004 14:55:29 +0000 Subject: 2004-09-20 LIU Xin * isis_dr.c, isis_events.c: Remove hello multiplier usage while scheduling DIS election. * isis_pdu.c: Don't call isis_event_dis_status_change() whenever l[1|2]_desig_is is different from hdr.lan_id. --- isisd/isis_pdu.c | 46 ++++++++++++++++------------------------------ 1 file changed, 16 insertions(+), 30 deletions(-) (limited to 'isisd/isis_pdu.c') diff --git a/isisd/isis_pdu.c b/isisd/isis_pdu.c index cd685286..bf8c14f7 100644 --- a/isisd/isis_pdu.c +++ b/isisd/isis_pdu.c @@ -825,40 +825,26 @@ process_lan_hello (int level, struct isis_circuit *circuit, u_char * ssnpa) circuit->u.bc.lan_neighs[level - 1]); } - switch (level) - { - case 1: - if (memcmp (circuit->u.bc.l1_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1)) - { - thread_add_event (master, isis_event_dis_status_change, circuit, 0); - if (adj->dis_record[level-1].dis == ISIS_IS_DIS) + if(adj->dis_record[level-1].dis==ISIS_IS_DIS) + switch (level) + { + case 1: + if (memcmp (circuit->u.bc.l1_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1)) + { + thread_add_event (master, isis_event_dis_status_change, circuit, 0); memcpy (&circuit->u.bc.l1_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1); - } - break; - case 2: - if (memcmp (circuit->u.bc.l2_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1)) - { - thread_add_event (master, isis_event_dis_status_change, circuit, 0); - if (adj->dis_record[level-1].dis == ISIS_IS_DIS) + } + break; + case 2: + if (memcmp (circuit->u.bc.l2_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1)) + { + thread_add_event (master, isis_event_dis_status_change, circuit, 0); memcpy (&circuit->u.bc.l2_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1); - } - break; - } - -#if 0 - /* Old solution: believe the lan-header always - */ - if (level == 1) - { - memcpy (circuit->u.bc.l1_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1); - } - else if (level == 2) - { - memcpy (circuit->u.bc.l2_desig_is, hdr.lan_id, ISIS_SYS_ID_LEN + 1); - } -#endif + } + break; + } adj->hold_time = hdr.hold_time; adj->last_upd = time (NULL); -- cgit v1.2.1