[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] ospfd stuck in ExStart
From: |
Yury Shevchuk |
Subject: |
[PATCH] ospfd stuck in ExStart |
Date: |
Fri, 6 Dec 2002 18:00:12 +0300 |
User-agent: |
Mutt/1.0pre3i |
Greetings!
I have fixed a bug in zebra-0.93b's ospfd. In my case, the bug
manifested itself by the failure to establish adjacency with DR/BDR
because of failed authentication for the Initial DBD packets (while
authentication for preceding Hello packets passed ok). The ospfd
stays in ExStart state, logging the message "Packet[DD]: Initial DBD
from Slave, ignoring." every 5 seconds.
The problem was caused by improper allocation size in ospf_packet_dup ():
the stream was allocated without the extra space required for MD5 digest.
So when ospf_make_md5_digest called from ospf_write () tries to
stream_put (op->s, digest, OSPF_AUTH_MD5_SIZE), it has no effect:
CHECK_SIZE(s, size) in stream_put cuts the size down to zero. The
packet goes out with garbage in place of MD5 digest and fails to pass
authentication on the receiving side.
The trivial patch is below.
Thank you,
-- Yury Shevchuk
Index: ospf_packet.c
===================================================================
RCS file: /usr/local/src/cvsroot/zebra/ospfd/ospf_packet.c,v
retrieving revision 1.4
diff -5 -u -r1.4 ospf_packet.c
--- ospf_packet.c 2002/12/06 07:45:09 1.4
+++ ospf_packet.c 2002/12/06 14:20:22
@@ -224,11 +224,11 @@
struct ospf_packet *
ospf_packet_dup (struct ospf_packet *op)
{
struct ospf_packet *new;
- new = ospf_packet_new (op->length);
+ new = ospf_packet_new (op->length + OSPF_AUTH_MD5_SIZE);
ospf_stream_copy (new->s, op->s);
new->dst = op->dst;
new->length = op->length;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] ospfd stuck in ExStart,
Yury Shevchuk <=