forked from Mirror/frr
2005-02-08 Paul Jakma <paul@dishone.st>
* ospf_packet.c: (various) Remove unneeded stream_set_putp abuse.
This commit is contained in:
parent
b14ee00b7f
commit
3a9eb09149
|
@ -1,3 +1,7 @@
|
||||||
|
2005-02-08 Paul Jakma <paul@dishone.st>
|
||||||
|
|
||||||
|
* ospf_packet.c: (various) Remove unneeded stream_set_putp abuse.
|
||||||
|
|
||||||
2005-02-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
2005-02-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
|
||||||
|
|
||||||
* ospf_packet.c: (ospf_read) Fix bug: must check for state ISM_Down,
|
* ospf_packet.c: (ospf_read) Fix bug: must check for state ISM_Down,
|
||||||
|
|
|
@ -348,7 +348,6 @@ ospf_make_md5_digest (struct ospf_interface *oi, struct ospf_packet *op)
|
||||||
unsigned char digest[OSPF_AUTH_MD5_SIZE];
|
unsigned char digest[OSPF_AUTH_MD5_SIZE];
|
||||||
struct md5_ctx ctx;
|
struct md5_ctx ctx;
|
||||||
void *ibuf;
|
void *ibuf;
|
||||||
unsigned long oldputp;
|
|
||||||
u_int32_t t;
|
u_int32_t t;
|
||||||
struct crypt_key *ck;
|
struct crypt_key *ck;
|
||||||
char *auth_key;
|
char *auth_key;
|
||||||
|
@ -381,10 +380,7 @@ ospf_make_md5_digest (struct ospf_interface *oi, struct ospf_packet *op)
|
||||||
md5_finish_ctx (&ctx, digest);
|
md5_finish_ctx (&ctx, digest);
|
||||||
|
|
||||||
/* Append md5 digest to the end of the stream. */
|
/* Append md5 digest to the end of the stream. */
|
||||||
oldputp = stream_get_putp (op->s);
|
|
||||||
stream_set_putp (op->s, ntohs (ospfh->length));
|
|
||||||
stream_put (op->s, digest, OSPF_AUTH_MD5_SIZE);
|
stream_put (op->s, digest, OSPF_AUTH_MD5_SIZE);
|
||||||
stream_set_putp (op->s, oldputp);
|
|
||||||
|
|
||||||
/* We do *NOT* increment the OSPF header length. */
|
/* We do *NOT* increment the OSPF header length. */
|
||||||
op->length = ntohs (ospfh->length) + OSPF_AUTH_MD5_SIZE;
|
op->length = ntohs (ospfh->length) + OSPF_AUTH_MD5_SIZE;
|
||||||
|
@ -2643,7 +2639,7 @@ ospf_make_hello (struct ospf_interface *oi, struct stream *s)
|
||||||
/* Set Designated Router. */
|
/* Set Designated Router. */
|
||||||
stream_put_ipv4 (s, DR (oi).s_addr);
|
stream_put_ipv4 (s, DR (oi).s_addr);
|
||||||
|
|
||||||
p = s->putp;
|
p = stream_get_putp (s);
|
||||||
|
|
||||||
/* Set Backup Designated Router. */
|
/* Set Backup Designated Router. */
|
||||||
stream_put_ipv4 (s, BDR (oi).s_addr);
|
stream_put_ipv4 (s, BDR (oi).s_addr);
|
||||||
|
@ -2668,10 +2664,7 @@ ospf_make_hello (struct ospf_interface *oi, struct stream *s)
|
||||||
|
|
||||||
/* Let neighbor generate BackupSeen. */
|
/* Let neighbor generate BackupSeen. */
|
||||||
if (flag == 1)
|
if (flag == 1)
|
||||||
{
|
stream_putl_at (s, p, 0); /* ipv4 address, normally */
|
||||||
stream_set_putp (s, p);
|
|
||||||
stream_put_ipv4 (s, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
@ -2729,8 +2722,7 @@ ospf_make_db_desc (struct ospf_interface *oi, struct ospf_neighbor *nbr,
|
||||||
{
|
{
|
||||||
nbr->dd_flags &= ~OSPF_DD_FLAG_M;
|
nbr->dd_flags &= ~OSPF_DD_FLAG_M;
|
||||||
/* Set DD flags again */
|
/* Set DD flags again */
|
||||||
stream_set_putp (s, pp);
|
stream_putc_at (s, pp, nbr->dd_flags);
|
||||||
stream_putc (s, nbr->dd_flags);
|
|
||||||
}
|
}
|
||||||
return length;
|
return length;
|
||||||
}
|
}
|
||||||
|
@ -2905,10 +2897,7 @@ ospf_make_ls_upd (struct ospf_interface *oi, struct list *update, struct stream
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Now set #LSAs. */
|
/* Now set #LSAs. */
|
||||||
stream_set_putp (s, pp);
|
stream_putl_at (s, pp, count);
|
||||||
stream_putl (s, count);
|
|
||||||
|
|
||||||
stream_set_putp (s, s->endp);
|
|
||||||
|
|
||||||
if (IS_DEBUG_OSPF_EVENT)
|
if (IS_DEBUG_OSPF_EVENT)
|
||||||
zlog_debug ("ospf_make_ls_upd: Stop");
|
zlog_debug ("ospf_make_ls_upd: Stop");
|
||||||
|
|
Loading…
Reference in a new issue