summaryrefslogtreecommitdiffstats
path: root/proto/ospf/packet.c
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2009-01-12 23:42:51 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2009-01-12 23:42:51 +0100
commitf15cb99c79034fbd98d90b104bd6267e6c2fec81 (patch)
tree04fda46ccf4b9d76186400688535538d33c4417d /proto/ospf/packet.c
parent02a9eeeb8547b3f0940a0295df8a78ce2181ec30 (diff)
downloadbird-f15cb99c79034fbd98d90b104bd6267e6c2fec81.tar
bird-f15cb99c79034fbd98d90b104bd6267e6c2fec81.zip
Add check detecting packet overwrite in TX buffer.
Diffstat (limited to 'proto/ospf/packet.c')
-rw-r--r--proto/ospf/packet.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c
index 5d47c48..ed5dd9d 100644
--- a/proto/ospf/packet.c
+++ b/proto/ospf/packet.c
@@ -398,6 +398,9 @@ ospf_send_to(sock *sk, ip_addr ip, struct ospf_iface *ifa)
int len = ntohs(pkt->length) + ((ifa->autype == OSPF_AUTH_CRYPT) ? OSPF_AUTH_CRYPT_SIZE : 0);
ospf_pkt_finalize(ifa, pkt);
+ if (sk->tbuf != sk->tpos)
+ log(L_ERR "Aiee, old packet was overwritted in TX buffer");
+
if (ipa_equal(ip, IPA_NONE))
sk_send(sk, len);
else