]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Deleted useles "struct proto" sending.
authorOndrej Filip <feela@network.cz>
Fri, 4 Jun 2004 17:05:24 +0000 (17:05 +0000)
committerOndrej Filip <feela@network.cz>
Fri, 4 Jun 2004 17:05:24 +0000 (17:05 +0000)
proto/ospf/lsack.c
proto/ospf/lsack.h
proto/ospf/lsupd.c
proto/ospf/packet.c

index d2f20bf6756881060f6f6a22b5da0ef1a9fb834d..fb0844dda5d273efc2929ee361d1c997d9d875ee 100644 (file)
@@ -18,11 +18,9 @@ char *s_queue[] = { "direct", "delayed" };
 
 void
 ospf_lsack_enqueue(struct ospf_neighbor *n, struct ospf_lsa_header *h,
-                  struct proto *p, int queue)
+                  int queue)
 {
-  struct lsah_n *no;
-
-  no = mb_alloc(n->pool, sizeof(struct lsah_n));
+  struct lsah_n *no = mb_alloc(n->pool, sizeof(struct lsah_n));
   memcpy(&no->lsa, h, sizeof(struct ospf_lsa_header));
   add_tail(&n->ackl[queue], NODE no);
   DBG("Adding (%s) ack for %I, ID: %I, RT: %I, Type: %u\n", s_queue[queue],
@@ -120,7 +118,7 @@ ospf_lsack_send(struct ospf_neighbor *n, int queue)
 }
 
 void
-ospf_lsack_receive(struct ospf_lsack_packet *ps, struct proto *p,
+ospf_lsack_receive(struct ospf_lsack_packet *ps,
                   struct ospf_iface *ifa, u16 size)
 {
   u32 nrid, myrid;
@@ -130,6 +128,7 @@ ospf_lsack_receive(struct ospf_lsack_packet *ps, struct proto *p,
   u16 nolsa, i;
   struct top_hash_entry *en;
   u16 lenn = ntohs(ps->ospf_packet.length);
+  struct proto *p = (struct proto *) ifa->proto;
 
   nrid = ntohl(ps->ospf_packet.routerid);
 
index d336d3ee8bcd4a0925eb86321212bfcc93ef9c74..d56abc5463b78e51e4f40c8ff8ac7490a6bb023f 100644 (file)
@@ -16,10 +16,10 @@ struct lsah_n
   struct ospf_lsa_header lsa;
 };
 
-void ospf_lsack_receive(struct ospf_lsack_packet *ps, struct proto *p,
+void ospf_lsack_receive(struct ospf_lsack_packet *ps,
                        struct ospf_iface *ifa, u16 size);
 void ospf_lsack_send(struct ospf_neighbor *n, int queue);
 void ospf_lsack_enqueue(struct ospf_neighbor *n, struct ospf_lsa_header *h,
-                       struct proto *p, int queue);
+                       int queue);
 
 #endif /* _BIRD_OSPF_LSACK_H_ */
index f56974c966e1b7a07222f45e80c39c920297d9bf..0f50cb55bcb088efd880d0cc84fa891ce0eb5805 100644 (file)
@@ -366,7 +366,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
     /* pg 143 (4) */
     if((lsatmp.age==LSA_MAXAGE)&&(lsadb==NULL)&&can_flush_lsa(oa))
     {
-      ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
+      ospf_lsack_enqueue(n, lsa, ACKL_DIRECT);
       continue;
     }
 
@@ -399,7 +399,7 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
 
         if((lsatmp.age==LSA_MAXAGE)&&(lsatmp.sn==LSA_MAXSEQNO))
         {
-          ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
+          ospf_lsack_enqueue(n, lsa, ACKL_DIRECT);
           continue;
         }
 
@@ -432,9 +432,9 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
         DBG("Wasn't flooded back\n");  /* ps 144(5e), pg 153 */
         if(ifa->state==OSPF_IS_BACKUP)
        {
-         if(ifa->drid==n->rid) ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
+         if(ifa->drid==n->rid) ospf_lsack_enqueue(n, lsa, ACKL_DELAY);
        }
-       else ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
+       else ospf_lsack_enqueue(n, lsa, ACKL_DELAY);
       }
 
       /* Remove old from all ret lists */
@@ -488,13 +488,13 @@ ospf_lsupd_rx(struct ospf_lsupd_packet *ps, struct proto *p,
         ospf_hash_delete(n->lsrth, en);
         if(ifa->state==OSPF_IS_BACKUP)
         {
-          if(n->rid==ifa->drid) ospf_lsack_enqueue(n, lsa, p, ACKL_DELAY);
+          if(n->rid==ifa->drid) ospf_lsack_enqueue(n, lsa, ACKL_DELAY);
         }
       }
       else
       {
         /* pg145 (7b) */
-        ospf_lsack_enqueue(n, lsa, p, ACKL_DIRECT);
+        ospf_lsack_enqueue(n, lsa, ACKL_DIRECT);
       }
       continue;
     }
index 53daa8f2edc176fd375514cbdd84aabeb0146f54..e2d10d1d3aa4b4a90a5e2bce4c6833aa803b5dc8 100644 (file)
@@ -192,7 +192,7 @@ ospf_rx_hook (sock * sk, int size)
       break;
     case LSACK_P:
       DBG ("%s: Link state ack received.\n", p->name);
-      ospf_lsack_receive((struct ospf_lsack_packet *) ps, p, ifa, size);
+      ospf_lsack_receive((struct ospf_lsack_packet *) ps, ifa, size);
       break;
     default:
       log ("%s: Bad packet received: wrong type %u", p->name, ps->type);