linux/net/x25
John Hughes ddd0451fc8 x.25 attempts to negotiate invalid throughput
The current X.25 code has some bugs in throughput negotiation:

   1. It does negotiation in all cases, usually there is no need
   2. It incorrectly attempts to negotiate the throughput class in one
      direction only.  There are separate throughput classes for input
      and output and if either is negotiated both mist be negotiates.

This is bug https://bugzilla.kernel.org/show_bug.cgi?id=15681

This bug was first reported by Daniel Ferenci to the linux-x25 mailing
list on 6/8/2004, but is still present.

The current (2.6.34) x.25 code doesn't seem to know that the X.25
throughput facility includes two values, one for the required
throughput outbound, one for inbound.

This causes it to attempt to negotiate throughput 0x0A, which is
throughput 9600 inbound and the illegal value "0" for inbound
throughput.

Because of this some X.25 devices (e.g. Cisco 1600) refuse to connect
to Linux X.25.

The following patch fixes this behaviour.  Unless the user specifies a
required throughput it does not attempt to negotiate.  If the user
does not specify a throughput it accepts the suggestion of the remote
X.25 system.  If the user requests a throughput then it validates both
the input and output throughputs and correctly negotiates them with
the remote end.

Signed-off-by: John Hughes <john@calva.com>
Tested-by: Andrew Hendry <andrew.hendry@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2010-04-07 21:33:02 -07:00
..
af_x25.c x.25 attempts to negotiate invalid throughput 2010-04-07 21:33:02 -07:00
Kconfig [NET]: move config options out to individual protocols 2005-07-11 21:13:56 -07:00
Makefile [X.25]: Add call forwarding 2007-02-08 13:34:02 -08:00
sysctl_net_x25.c sysctl net: Remove unused binary sysctl code 2009-11-12 02:05:06 -08:00
x25_dev.c net: backlog functions rename 2010-03-05 13:34:03 -08:00
x25_facilities.c x.25 attempts to negotiate invalid throughput 2010-04-07 21:33:02 -07:00
x25_forward.c [X25]: use LIST_HEAD instead of LIST_HEAD_INIT 2008-01-28 14:56:53 -08:00
x25_in.c x25: Patch to fix bug 15678 - x25 accesses fields beyond end of packet. 2010-04-07 21:29:25 -07:00
x25_link.c [X25]: use LIST_HEAD instead of LIST_HEAD_INIT 2008-01-28 14:56:53 -08:00
x25_out.c [SK_BUFF]: Introduce skb_copy_to_linear_data{_offset} 2007-04-25 22:28:29 -07:00
x25_proc.c net: x25: use seq_list_foo() helpers 2010-02-10 11:12:10 -08:00
x25_route.c X25: Fix oops and refcnt problems from x25_dev_get 2009-11-29 00:25:02 -08:00
x25_subr.c X25: Enable setting of cause and diagnostic fields 2009-11-18 23:30:41 -08:00
x25_timer.c x25: Fix sleep from timer on socket destroy. 2009-06-16 05:40:30 -07:00