]> Zhao Yanbai Git Server - minix.git/commitdiff
inet: Reply to TASK messages even if we're waiting for STAT reply 10/810/1
authorLubomir Rintel <lkundrak@v3.sk>
Sun, 5 Aug 2012 14:33:20 +0000 (16:33 +0200)
committerBen Gras <ben@minix3.org>
Thu, 12 Sep 2013 12:06:27 +0000 (14:06 +0200)
As they can come anytime upon receipt of interrupt by the ethernet driver. This
is the same thing as is done for CONF replies.

A simple test case would be the following via ssh connection:
while getaddr; do :; done

Change-Id: I68f4403360b3eefe67fc602c4855ca1abd649475

servers/inet/mnx_eth.c

index d3967eb92c982ea6d6b1d28c52ca494dc5297fad..1625b4fb65b243a6228f5424f5d43026326b984c 100644 (file)
@@ -277,6 +277,17 @@ void eth_rec(message *m)
        }
        if (loc_port->etp_osdep.etp_state == OEPS_GETSTAT_SENT)
        {
+               if (m_type == DL_TASK_REPLY)
+               {
+                       flags= m->DL_FLAGS;
+
+                       if (flags & DL_PACK_SEND)
+                               write_int(loc_port);
+                       if (flags & DL_PACK_RECV)
+                               read_int(loc_port, m->DL_COUNT);
+                       return;
+               }
+
                if (m_type != DL_STAT_REPLY)
                {
                        printf(