]> git.meshlink.io Git - utcp/commitdiff
When debugging, set initial segment seqno to 0.
authorGuus Sliepen <guus@meshlink.io>
Sun, 18 Oct 2015 11:42:36 +0000 (13:42 +0200)
committerGuus Sliepen <guus@sliepen.org>
Sun, 2 Jul 2017 10:01:45 +0000 (12:01 +0200)
utcp.c

diff --git a/utcp.c b/utcp.c
index 7624aa576d39c8753c810cea4c4f8643c377d3d4..354cbe547637b0bdf0dc4709dee2205b23d0863e 100644 (file)
--- a/utcp.c
+++ b/utcp.c
@@ -282,7 +282,12 @@ static struct utcp_connection *allocate_connection(struct utcp *utcp, uint16_t s
 
        c->src = src;
        c->dst = dst;
+#ifdef UTCP_DEBUG
+#warning debugging
+       c->snd.iss = 0;
+#else
        c->snd.iss = rand();
+#endif
        c->snd.una = c->snd.iss;
        c->snd.nxt = c->snd.iss + 1;
        c->rcv.wnd = utcp->mtu;