]> git.baikalelectronics.ru Git - kernel.git/commit
net: x25: Fix handling of Restart Request and Restart Confirmation
authorXie He <xie.he.0141@gmail.com>
Wed, 9 Dec 2020 08:16:04 +0000 (00:16 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 10 Dec 2020 03:34:25 +0000 (19:34 -0800)
commit9919d6b118cb4aae2e9c578f447c88badbc81e8a
treeb148dc7b5646654235eefa3bd45022b404dcf19a
parent416b310dd162551ab52604b3954d410a670f99bb
net: x25: Fix handling of Restart Request and Restart Confirmation

1. When the x25 module gets loaded, layer 2 may already be running and
connected. In this case, although we are in X25_LINK_STATE_0, we still
need to handle the Restart Request received, rather than ignore it.

2. When we are in X25_LINK_STATE_2, we have already sent a Restart Request
and is waiting for the Restart Confirmation with t20timer. t20timer will
restart itself repeatedly forever so it will always be there, as long as we
are in State 2. So we don't need to check x25_t20timer_pending again.

Fixes: c3ac49573ec5 ("net/x25: fix restart request/confirm handling")
Cc: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: Xie He <xie.he.0141@gmail.com>
Acked-by: Martin Schiller <ms@dev.tdt.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/x25/x25_link.c