Commit 2b91efad authored by Olivier Crête's avatar Olivier Crête

pseudotcp: Do roll-over safe assertion

In case of a roll-over, only the difference matters.
parent a0b07e1d
......@@ -1961,7 +1961,7 @@ transmit(PseudoTcpSocket *self, SSegment *segment, guint32 now)
PseudoTcpWriteResult wres;
/* The packet must not have already been acknowledged. */
g_assert_cmpuint (segment->seq, >=, priv->snd_una);
g_assert_cmpuint (segment->seq - priv->snd_una, <=, 1024 * 1024 * 64);
/* Write out the packet. */
wres = packet(self, seq, flags,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment