From 6f570b64eded26cdd171c6a2a3f6d9242ec61c4b Mon Sep 17 00:00:00 2001 From: Yoshihiko Yazawa Date: Tue, 14 Dec 2010 21:42:21 -0800 Subject: [PATCH] Intermediate node reply at invalid sequence number --- src/routing/aodv/aodv-routing-protocol.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/routing/aodv/aodv-routing-protocol.cc b/src/routing/aodv/aodv-routing-protocol.cc index 40c76d261..89e6fc5d0 100644 --- a/src/routing/aodv/aodv-routing-protocol.cc +++ b/src/routing/aodv/aodv-routing-protocol.cc @@ -1036,8 +1036,8 @@ RoutingProtocol::RecvRequest (Ptr p, Ipv4Address receiver, Ipv4Address s * However, the forwarding node MUST NOT modify its maintained value for the destination sequence number, even if the value * received in the incoming RREQ is larger than the value currently maintained by the forwarding node. */ - if (rreqHeader.GetUnknownSeqno () || ( (int32_t (toDst.GetSeqNo ()) - int32_t (rreqHeader.GetDstSeqno ()) > 0) - && toDst.GetValidSeqNo () )) + if ((rreqHeader.GetUnknownSeqno () || (int32_t (toDst.GetSeqNo ()) - int32_t (rreqHeader.GetDstSeqno ()) >= 0)) + && toDst.GetValidSeqNo () ) { if (!rreqHeader.GetDestinationOnly () && toDst.GetFlag() == VALID) {