From: Ondrej Zajicek Date: Mon, 12 Jan 2009 22:42:51 +0000 (+0100) Subject: Add check detecting packet overwrite in TX buffer. X-Git-Tag: v1.2.0~155 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f15cb99c79034fbd98d90b104bd6267e6c2fec81;p=thirdparty%2Fbird.git Add check detecting packet overwrite in TX buffer. --- diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index 5d47c48ef..ed5dd9d79 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