Intermediate node reply at invalid sequence number

This commit is contained in:
Yoshihiko Yazawa
2010-12-14 21:42:21 -08:00
parent abcf132cd7
commit 6f570b64ed

View File

@@ -1036,8 +1036,8 @@ RoutingProtocol::RecvRequest (Ptr<Packet> 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)
{