Fix for pre-patch-2.1.99-2 accident

Henner Eisen (eis@baty.hanse.de)
Wed, 29 Apr 1998 19:21:51 +0200


Hi,

pre-patch-2.1.99-2 accidentally reverts a 2.1.96 change which fixed a bug
in the X.25 network code (without, it is impossible to set x25 facilities
for an outgoing connection). I've extracted the corresponding hunk from
patch-2.1.97.

Linus, please re-apply to pre-2.1.99-x!

(Seems that an input source for pre-patch-2.1.99-2 was generated from a tree
which was not properly sync-ed with 2.1.96+. Whoever provided the corresponding
input to Linus, please check your tree and also re-apply patch below).

Henner

diff -u --recursive --new-file v2.1.95/linux/net/x25/af_x25.c linux/net/x25/af_x25.c
--- v2.1.95/linux/net/x25/af_x25.c Tue Mar 17 22:18:16 1998
+++ linux/net/x25/af_x25.c Sun Apr 12 11:42:16 1998
@@ -1118,13 +1118,14 @@
struct x25_facilities facilities;
if (copy_from_user(&facilities, (void *)arg, sizeof(facilities)))
return -EFAULT;
- if (sk->state != TCP_LISTEN)
+ if (sk->state != TCP_LISTEN && sk->state != TCP_CLOSE)
return -EINVAL;
if (facilities.pacsize_in < X25_PS16 || facilities.pacsize_in > X25_PS4096)
return -EINVAL;
if (facilities.pacsize_out < X25_PS16 || facilities.pacsize_out > X25_PS4096)
return -EINVAL;
- if (sk->protinfo.x25->neighbour->extended) {
+ if (sk->state == TCP_CLOSE || sk->protinfo.x25->neighbour->extended)
+ {
if (facilities.winsize_in < 1 || facilities.winsize_in > 127)
return -EINVAL;
if (facilities.winsize_out < 1 || facilities.winsize_out > 127)

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu