]> git.puffer.fish Git - mirror/frr.git/commit
Bug in ospf6_lsa_compare()
authorYasuhiro Ohara <yasu@jaist.ac.jp>
Thu, 17 Dec 2009 05:41:17 +0000 (05:41 +0000)
committerDaniel Walton <dwalton@cumulusnetworks.com>
Thu, 26 May 2016 01:14:44 +0000 (01:14 +0000)
commit52cf4a5181d11481743f685c38c5711641c52e52
tree6e6f58379ac54278b6e876710347bd10a0e5e3f5
parentdaa4981e60c3130222a38d6ec3e653f87bc64612
Bug in ospf6_lsa_compare()

This fix is probably correct on 32bit systems,
but i think it will not work on 64bit systems.
sizeof(signed long) would be 8 and therefore the
cast from u_int32_t will map all the values to
non-negative part of long int.

You would like to use int (like in ospfd) and
change the type of seqnuma, seqnumb to that.

The type int32_t would be even more proper, but
sizeof(int) is 4 on relevant platforms.

Signed-off: Ondrej Zajicek <santiago@crfreenet.org>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Yasuhiro Ohara <yasu@jaist.ac.jp>
(cherry picked from commit bdd8cd70a042473477f9144c9cedb8dde11ba2c1)
ospf6d/ospf6_lsa.c