Subject: [manet] AODV: Confusion about signed comparison sequence numbers

From: Bart Braem <[email-masked]>
Date: Fri, 29 Oct 2004 09:10:42 +0200

I am having a problem understanding chapter 6.1 of the AODV RFC: how does the 
comparison of sequence numbers work:
"This comparison MUST be done using signed 32-bit arithmetic, this is 
necessary to accomplish sequence number rollover.  If the result of 
subtracting the currently stored sequence number from the value of the 
incoming sequence number is less than zero, then the information related to 
that destination in the AODV message MUST be discarded, since that 
information is stale compared to the node's currently stored information."

Now I don't understand why it's not the other way round: when the value is 
larger than zero, then ... Because when I have to number that are smaller 
than 2^31-1 they have their most significant bit on 0. Then, according to 
what I know and can find, the unsigned and the signed integer value are the 
same. So what's written in the RFC is: if the currently stored sequence 
number is smaller then the incoming sequence number (their difference is 
negative), then the newer information MUST be discarded?

I know there must be a mistake in my reasoning, but where?

Thanks a lot for any information,
Bart

_______________________________________________
manet mailing list
[email-masked]
https://www1.ietf.org/mailman/listinfo/manet