diff options
author | Ondrej Filip <feela@network.cz> | 2004-06-04 18:24:15 +0000 |
---|---|---|
committer | Ondrej Filip <feela@network.cz> | 2004-06-04 18:24:15 +0000 |
commit | f158bb710b8be65b626f54399c8a5db8df9bd7b6 (patch) | |
tree | 5c6d9c43b96dab1142ebcae5384d017593ef1521 | |
parent | 12bed559ffaccc7093188722899e4ac85521777e (diff) |
no comment
-rw-r--r-- | proto/ospf/dbdes.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/proto/ospf/dbdes.c b/proto/ospf/dbdes.c index 63c03706..f591955b 100644 --- a/proto/ospf/dbdes.c +++ b/proto/ospf/dbdes.c @@ -1,7 +1,7 @@ /* * BIRD -- OSPF * - * (c) 1999 - 2000 Ondrej Filip <feela@network.cz> + * (c) 1999--2004 Ondrej Filip <feela@network.cz> * * Can be freely distributed and used under the terms of the GNU GPL. */ @@ -28,7 +28,6 @@ ospf_dbdes_send(struct ospf_neighbor *n) u16 length; struct proto *p = (struct proto *) (ifa->proto); u16 i, j; - u8 *aa, *bb; if ((oa->rt == NULL) || (EMPTY_LIST(oa->lsal))) originate_rt_lsa(oa); @@ -118,15 +117,10 @@ ospf_dbdes_send(struct ospf_neighbor *n) case NEIGHBOR_LOADING: case NEIGHBOR_FULL: - aa = ifa->ip_sk->tbuf; - bb = n->ldbdes; - op = n->ldbdes; - length = ntohs(op->length); + length = ntohs(((struct ospf_packet *)n)->length); - for (i = 0; i < length; i++) - { - *(aa + i) = *(bb + i); /* Copy last sent packet again */ - } + memcpy(ifa->ip_sk->tbuf, n->ldbdes, length); + /* Copy last sent packet again */ sk_send_to(ifa->ip_sk, length, n->ip, OSPF_PROTO); OSPF_TRACE(D_PACKETS, "DB_DES (M) sent to %I via %s.", n->ip, |