diff options
Diffstat (limited to 'proto/ospf/dbdes.c')
-rw-r--r-- | proto/ospf/dbdes.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 03e010e2..1f9dd55e 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -39,6 +39,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n) switch(n->state) { case NEIGHBOR_EXSTART: /* Send empty packets */ + n->myimms.bit.i=1; pkt=(struct ospf_dbdes_packet *)(ifa->ip_sk->tbuf); op=(struct ospf_packet *)pkt; fill_ospf_pkt_hdr(ifa, pkt, DBDES_P); @@ -55,6 +56,8 @@ ospf_dbdes_tx(struct ospf_neighbor *n) break; case NEIGHBOR_EXCHANGE: + n->myimms.bit.i=0; + if(((n->myimms.bit.ms) && (n->dds==n->ddr+1)) || ((!(n->myimms.bit.ms)) && (n->dds==n->ddr))) { @@ -139,6 +142,7 @@ ospf_dbdes_tx(struct ospf_neighbor *n) { ospf_neigh_sm(n, INM_EXDONE); if(n->myimms.bit.ms) tm_stop(n->rxmt_timer); + else tm_start(n->rxmt_timer,ifa->rxmtint); } } break; @@ -277,7 +281,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)) @@ -295,14 +299,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"); + log("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"); + log("SEQMIS-BIT-I\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -311,7 +315,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, if(ps->options!=n->options) /* Options differs */ { - DBG("SEQMIS-OPT\n"); + log("SEQMIS-OPT\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -320,7 +324,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, { if(ntohl(ps->ddseq)!=n->dds) /* MASTER */ { - DBG("SEQMIS-MASTER\n"); + log("SEQMIS-MASTER\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -341,7 +345,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, { if(ntohl(ps->ddseq)!=(n->dds+1)) /* SLAVE */ { - DBG("SEQMIS-SLAVE\n"); + log("SEQMIS-SLAVE\n"); ospf_neigh_sm(n, INM_SEQMIS); break; } @@ -362,7 +366,7 @@ ospf_dbdes_rx(struct ospf_dbdes_packet *ps, struct proto *p, } else { - DBG("SEQMIS-FULL\n"); + log("SEQMIS-FULL\n"); ospf_neigh_sm(n, INM_SEQMIS); } break; |