diff options
author | Ondrej Filip <feela@network.cz> | 2000-05-11 01:42:37 +0200 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2000-05-11 01:42:37 +0200 |
commit | 394920a09c6163d2b98896802526c79c82f52d20 (patch) | |
tree | 92d961ed15473617e3dc27484d96f2f0f6f7fc0f /proto | |
parent | 31dca4353460b7a8bfb272e63ceac46deb3a6944 (diff) | |
download | bird-394920a09c6163d2b98896802526c79c82f52d20.tar bird-394920a09c6163d2b98896802526c79c82f52d20.zip |
Test better lsa size.
Diffstat (limited to 'proto')
-rw-r--r-- | proto/ospf/dbdes.c | 30 |
1 files changed, 16 insertions, 14 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 881b620..64e613b 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -13,14 +13,12 @@ ospf_dbdes_tx(struct ospf_neighbor *n) { struct ospf_dbdes_packet *pkt; struct ospf_packet *op; - struct ospf_iface *ifa; + struct ospf_iface *ifa=n->ifa; u16 length; struct proto *p; u16 i,j; u8 *aa,*bb; - ifa=n->ifa; - p=(struct proto *)(ifa->proto); switch(n->state) @@ -38,7 +36,8 @@ ospf_dbdes_tx(struct ospf_neighbor *n) op->length=htons(length); ospf_pkt_finalize(ifa, op); sk_send_to(ifa->ip_sk,length, n->ip, OSPF_PROTO); - debug("%s: DB_DES (I) sent to %I.\n", p->name, n->rid); + debug("%s: DB_DES (I) sent to %I via %s.\n", p->name, n->ip, + ifa->iface->name); break; case NEIGHBOR_EXCHANGE: @@ -102,7 +101,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n) op->length=htons(length); ospf_pkt_finalize(ifa, op); - DBG("%s: DB_DES (M) sent to %I.\n", p->name, n->rid); + DBG("%s: DB_DES (M) sent to %I.\n", p->name, n->ip); } case NEIGHBOR_LOADING: @@ -117,9 +116,9 @@ ospf_dbdes_tx(struct ospf_neighbor *n) *(aa+i)=*(bb+i); /* Copy last sent packet again */ } - DBG("%s: DB_DES sending to %I.\n", p->name, n->rid); sk_send_to(ifa->ip_sk,length, n->ip, OSPF_PROTO); - debug("%s: DB_DES (M) sent to %I.\n", p->name, n->rid); + debug("%s: DB_DES (M) sent to %I via %s.\n", p->name, n->ip, + ifa->iface->name); if(n->myimms.bit.ms) tm_start(n->rxmt_timer,ifa->rxmtint); else { @@ -209,7 +208,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, if((n=find_neigh(ifa, nrid))==NULL) { - debug("%s: Received dbdes from unknown neigbor! (%I)\n", p->name, + debug("%s: Received dbdes from unknown neigbor! %I\n", p->name, nrid); return ; } @@ -220,7 +219,8 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, return ; } - debug("%s: Received dbdes from %I.\n", p->name, n->ip); + debug("%s: Received dbdes from %I via %s.\n", p->name, n->ip, + ifa->iface->name); switch(n->state) { @@ -269,6 +269,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, break; } } + if(ps->imms.bit.i) break; case NEIGHBOR_EXCHANGE: if((ps->imms.byte==n->imms.byte) && (ps->options=n->options) && (ntohl(ps->ddseq)==n->ddr)) @@ -286,14 +287,14 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, if(ps->imms.bit.ms!=n->imms.bit.ms) /* M/S bit differs */ { - DBG("SEQMIS-BIT-MS\n"); + debug("SEQMIS-BIT-MS\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } if(ps->imms.bit.i) /* I bit is set */ { - DBG("SEQMIS-BIT-I\n"); + debug("SEQMIS-BIT-I\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -302,7 +303,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, if(ps->options!=n->options) /* Options differs */ { - DBG("SEQMIS-OPT\n"); + debug("SEQMIS-OPT\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -311,7 +312,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, { if(ntohl(ps->ddseq)!=n->dds) /* MASTER */ { - DBG("SEQMIS-MASTER\n"); + debug("SEQMIS-MASTER\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -332,7 +333,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, { if(ntohl(ps->ddseq)!=(n->dds+1)) /* SLAVE */ { - DBG("SEQMIS-SLAVE\n"); + debug("SEQMIS-SLAVE\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -353,6 +354,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, } else { + debug("SEQMIS-FULL\n"); ospf_neigh_sm(n, INM_SEQMIS); } break; |