From: Ondrej Zajicek Date: Sun, 11 Apr 2010 08:19:54 +0000 (+0200) Subject: Fixes a bug in OSPF on NBMA interfaces. X-Git-Tag: v1.2.3~20^2~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7969ea3b41db05294c78a5e0ec0bd3c29ae8c549;p=thirdparty%2Fbird.git Fixes a bug in OSPF on NBMA interfaces. A very tricky bug. OSPF on NBMA interfaces probably never really worked. When a packet was sent to multiple destinations, the checksum was calculated multiple times from a packet with already filled checksum field (from previous calculation). Therefore, many packets were sent with an invalid checksum. --- diff --git a/proto/ospf/packet.c b/proto/ospf/packet.c index b47cbfc7b..e78eeea52 100644 --- a/proto/ospf/packet.c +++ b/proto/ospf/packet.c @@ -76,6 +76,7 @@ ospf_pkt_finalize(struct ospf_iface *ifa, struct ospf_packet *pkt) } password_cpy(pkt->u.password, passwd->password, sizeof(union ospf_auth)); case OSPF_AUTH_NONE: + pkt->checksum = 0; pkt->checksum = ipsum_calculate(pkt, sizeof(struct ospf_packet) - sizeof(union ospf_auth), (pkt + 1), ntohs(pkt->length) -