diff options
Diffstat (limited to 'ospfd')
-rw-r--r-- | ospfd/ChangeLog | 22 | ||||
-rw-r--r-- | ospfd/ospf_interface.c | 3 | ||||
-rw-r--r-- | ospfd/ospf_lsa.c | 4 |
3 files changed, 27 insertions, 2 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog index a5a1753a..265c9c76 100644 --- a/ospfd/ChangeLog +++ b/ospfd/ChangeLog @@ -1,3 +1,25 @@ +2006-03-27 Paul Jakma <paul.jakma@sun.com> + + * ospf_lsa.c: (ospf_lsa_checksum) Add an explicit cast to avoid + the ambiguities of ANSI and C99 C with respect to type + conversion. Detailed problem report and test case with + example data supplied by Dmitry Ivanov <dimss@telecentrs.lv>. + +2006-03-25 Paul Jakma <paul.jakma@sun.com> + + * ospf_interface.c: (ospf_if_lookup_recv_if) Ignore loopbacks, + we can never ever receive packets on those. Should fix + case where CARP is run with address in same subnet as real + interface. Problem report and diagnosis thanks to: + Landon Fuller <landonf@opendarwin.org>. + However, ospf_read() still can't deal deterministically with + multiple interfaces in same subnet. + +2006-03-23 Steve Lawson <steve.lawson@aheadcomusa.com> + + * ospf_lsa.c: (ospf_lsa_install) Fix incorrect byte-order + conversion of OSPF_MAX_SEQUENCE_NUMBER + 2006-01-19 Paul Jakma <paul.jakma@sun.com> * (general) various miscellaneous compiler warning fixes. diff --git a/ospfd/ospf_interface.c b/ospfd/ospf_interface.c index 82c4baee..8df0280a 100644 --- a/ospfd/ospf_interface.c +++ b/ospfd/ospf_interface.c @@ -474,6 +474,9 @@ ospf_if_lookup_recv_if (struct ospf *ospf, struct in_addr src) if (oi->type == OSPF_IFTYPE_VIRTUALLINK) continue; + if (if_is_loopback (oi->ifp)) + continue; + if ((oi->type == OSPF_IFTYPE_POINTOPOINT) && CONNECTED_DEST_HOST(oi->connected)) { diff --git a/ospfd/ospf_lsa.c b/ospfd/ospf_lsa.c index 8ef4da66..faae4376 100644 --- a/ospfd/ospf_lsa.c +++ b/ospfd/ospf_lsa.c @@ -202,7 +202,7 @@ ospf_lsa_checksum (struct lsa_header *lsa) c1 %= 255; } - x = ((length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255; + x = (((int)length - LSA_CHECKSUM_OFFSET) * c0 - c1) % 255; if (x <= 0) x += 255; y = 510 - c0 - x; @@ -2786,7 +2786,7 @@ ospf_lsa_install (struct ospf *ospf, struct ospf_interface *oi, can be originated. " */ - if (ntohl(lsa->data->ls_seqnum) - 1 == htonl(OSPF_MAX_SEQUENCE_NUMBER)) + if (ntohl(lsa->data->ls_seqnum) - 1 == OSPF_MAX_SEQUENCE_NUMBER) { if (ospf_lsa_is_self_originated(ospf, lsa)) { |