summaryrefslogtreecommitdiff
path: root/ospfd
diff options
context:
space:
mode:
authorpaul <paul>2006-01-10 23:27:05 +0000
committerpaul <paul>2006-01-10 23:27:05 +0000
commit818e56cf2723843377d2881a6b81b8adc0fe9160 (patch)
tree7abd2058a41c3e2b24f739dfd05ec3edfe5c265a /ospfd
parent37c38304e481037ed075f79f78a3d6f78038f907 (diff)
[ospfd] fix undefined effect expression
2006-01-10 Juris Kalnins <juris@mt.lv> * ospf_packet.c: (ospf_make_md5_digest) fix odd, if not undefined effect, assignment of an increment expression.
Diffstat (limited to 'ospfd')
-rw-r--r--ospfd/ChangeLog15
-rw-r--r--ospfd/ospf_packet.c6
2 files changed, 20 insertions, 1 deletions
diff --git a/ospfd/ChangeLog b/ospfd/ChangeLog
index 35d353e5..23a109af 100644
--- a/ospfd/ChangeLog
+++ b/ospfd/ChangeLog
@@ -1,7 +1,22 @@
+2006-01-10 Len Sorensen <lennartsorensen@ruggedcom.com>
+
+ * (general) Bug #234, see also [quagga-dev 3902].
+ Fix problem with nbr_self not being properly reinitialised
+ when an interface comes up, after having been down.
+ * ospf_neighbor.c: (ospf_nbr_add_self) centralise
+ initialisation of nbr_self parameters here.
+ * ospf_interface.c: (ospf_if_new) deleting initialisation of
+ parameters of nbr_self, just rely on call to
+ ospf_nbr_add_self.
+ (ospf_if_cleanup) ditto.
+ * ospfd.c: (ospf_network_run) ditto.
+
2006-01-10 Juris Kalnins <juris@mt.lv>
* ospf_zebra.c: (ospf_interface_address_delete) fix rare leak of
struct connected in an error case.
+ * ospf_packet.c: (ospf_make_md5_digest) fix odd, if not
+ undefined effect, assignment of an increment expression.
2006-01-10 Paul Jakma <paul.jakma@sun.com>
diff --git a/ospfd/ospf_packet.c b/ospfd/ospf_packet.c
index eb97ddbf..54b30ca7 100644
--- a/ospfd/ospf_packet.c
+++ b/ospfd/ospf_packet.c
@@ -339,7 +339,11 @@ ospf_make_md5_digest (struct ospf_interface *oi, struct ospf_packet *op)
/* We do this here so when we dup a packet, we don't have to
waste CPU rewriting other headers. */
t = (time(NULL) & 0xFFFFFFFF);
- oi->crypt_seqnum = ( t > oi->crypt_seqnum ? t : oi->crypt_seqnum++);
+ if (t > oi->crypt_seqnum)
+ oi->crypt_seqnum = t;
+ else
+ oi->crypt_seqnum++;
+
ospfh->u.crypt.crypt_seqnum = htonl (oi->crypt_seqnum);
/* Get MD5 Authentication key from auth_key list. */