lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201118135919.1447-3-ms@dev.tdt.de>
Date:   Wed, 18 Nov 2020 14:59:15 +0100
From:   Martin Schiller <ms@....tdt.de>
To:     andrew.hendry@...il.com, davem@...emloft.net, kuba@...nel.org,
        xie.he.0141@...il.com
Cc:     linux-x25@...r.kernel.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org, Martin Schiller <ms@....tdt.de>
Subject: [PATCH net-next v3 2/6] net/lapb: fix lapb_connect_request() for DCE

For a DTE interface we should change to state LAPB_STATE_1 and start
sending SABM(E). But for DCE interfaces, we simply should start the
timer t1.

Signed-off-by: Martin Schiller <ms@....tdt.de>
---
 net/lapb/lapb_iface.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/net/lapb/lapb_iface.c b/net/lapb/lapb_iface.c
index 3c03f6512c5f..8dd7c420ae93 100644
--- a/net/lapb/lapb_iface.c
+++ b/net/lapb/lapb_iface.c
@@ -278,10 +278,14 @@ int lapb_connect_request(struct net_device *dev)
 	if (lapb->state == LAPB_STATE_3 || lapb->state == LAPB_STATE_4)
 		goto out_put;
 
-	lapb_establish_data_link(lapb);
+	if (lapb->mode & LAPB_DCE) {
+		lapb_start_t1timer(lapb);
+	} else {
+		lapb_establish_data_link(lapb);
 
-	lapb_dbg(0, "(%p) S0 -> S1\n", lapb->dev);
-	lapb->state = LAPB_STATE_1;
+		lapb_dbg(0, "(%p) S0 -> S1\n", lapb->dev);
+		lapb->state = LAPB_STATE_1;
+	}
 
 	rc = LAPB_OK;
 out_put:
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ