]> git.puffer.fish Git - matthieu/frr.git/commitdiff
2004-09-20 LIU Xin <lx at ns.6test.edu.cn>
authorhasso <hasso>
Mon, 20 Sep 2004 14:55:29 +0000 (14:55 +0000)
committerhasso <hasso>
Mon, 20 Sep 2004 14:55:29 +0000 (14:55 +0000)
* 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/ChangeLog
isisd/isis_dr.c
isisd/isis_events.c
isisd/isis_pdu.c

index 4bd34942f4cfa44e90eba25626b550a6cbcd8803..262f53c09c335f3f121539d897531f791c21c6fe 100644 (file)
@@ -1,3 +1,10 @@
+2004-09-20 LIU Xin <lx at ns.6test.edu.cn>
+
+       * 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.
+
 2004-09-19 Hasso Tepper <hasso at quagga.net>
 
        * isis_spf.h: Renamed t_spf_periodic to t_spf as it's not used to
index b44d2123f827222975c0be9a8ad612cc190619b4..d7f3dfdc0fbec2f54b4fea709f8dfe1f6b01bb31 100644 (file)
@@ -311,12 +311,10 @@ isis_dr_commence (struct isis_circuit *circuit, int level)
   circuit->u.bc.run_dr_elect[level - 1] = 0;
   if (level == 1)
     THREAD_TIMER_ON (master, circuit->u.bc.t_run_dr[0], isis_run_dr_l1,
-                    circuit, 2 * circuit->hello_multiplier[0] *
-                    circuit->hello_interval[0]);
+                    circuit, 2 * circuit->hello_interval[0]);
   else
     THREAD_TIMER_ON (master, circuit->u.bc.t_run_dr[1], isis_run_dr_l2,
-                    circuit, 2 * circuit->hello_multiplier[1] *
-                    circuit->hello_interval[1]);
+                    circuit, 2 * circuit->hello_interval[1]);
   circuit->u.bc.is_dr[level - 1] = 1;
 
   if (level == 1)
index 16c69910c0f2bb4b3edb80f2ec91c7dc9fd4cddd..4f84388732826bd1f5ebc9478a487ea6115610e6 100644 (file)
@@ -146,8 +146,6 @@ isis_event_area_addr_change (struct isis_area *area)
 void
 circuit_commence_level (struct isis_circuit *circuit, int level)
 {
-  uint32_t interval;
-
   if (level == 1)
     {
       THREAD_TIMER_ON (master, circuit->t_send_psnp[0], send_l1_psnp, circuit,
@@ -155,11 +153,8 @@ circuit_commence_level (struct isis_circuit *circuit, int level)
 
       if (circuit->circ_type == CIRCUIT_T_BROADCAST)
        {
-         interval =
-           circuit->hello_multiplier[0] * (circuit->hello_interval[0]);
-
          THREAD_TIMER_ON (master, circuit->u.bc.t_run_dr[0], isis_run_dr_l1,
-                          circuit, interval);
+                          circuit, 2 * circuit->hello_interval[1]);
 
          THREAD_TIMER_ON (master, circuit->u.bc.t_send_lan_hello[0],
                           send_lan_l1_hello, circuit,
@@ -176,11 +171,8 @@ circuit_commence_level (struct isis_circuit *circuit, int level)
 
       if (circuit->circ_type == CIRCUIT_T_BROADCAST)
        {
-         interval =
-           circuit->hello_multiplier[1] * (circuit->hello_interval[1]);
-
          THREAD_TIMER_ON (master, circuit->u.bc.t_run_dr[1], isis_run_dr_l2,
-                          circuit, interval);
+                          circuit, 2 * circuit->hello_interval[1]);
 
          THREAD_TIMER_ON (master, circuit->u.bc.t_send_lan_hello[1],
                           send_lan_l2_hello, circuit,
index cd685286ce4fe3ade8bc5104979cb6158fde862e..bf8c14f78b99c4453b47931fa74ea3b476132c6a 100644 (file)
@@ -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);