diff options
Diffstat (limited to 'extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch')
-rw-r--r-- | extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch b/extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch new file mode 100644 index 00000000..b06d2c56 --- /dev/null +++ b/extras/recipes-kernel/linux/linux-omap/linus/0015-ppp-allow-disabling-multilink-protocol-ID-compressio.patch | |||
@@ -0,0 +1,64 @@ | |||
1 | From 3b4878d988f13c50a8a6d68e9359eb28cc432a4f Mon Sep 17 00:00:00 2001 | ||
2 | From: stephen hemminger <shemminger@vyatta.com> | ||
3 | Date: Mon, 20 Dec 2010 17:58:33 +0000 | ||
4 | Subject: [PATCH 15/65] ppp: allow disabling multilink protocol ID compression | ||
5 | |||
6 | Linux would not connect to other router running old version Cisco IOS (12.0). | ||
7 | This is most likely a bug in that version of IOS, since it is fixed | ||
8 | in later versions. As a workaround this patch allows a module parameter | ||
9 | to be set to disable compressing the protocol ID. | ||
10 | |||
11 | See: https://bugzilla.vyatta.com/show_bug.cgi?id=3979 | ||
12 | |||
13 | RFC 1990 allows an implementation to formulate MP fragments as if protocol | ||
14 | compression had been negotiated. This allows us to always send compressed | ||
15 | protocol IDs. But some implementations don't accept MP fragments with | ||
16 | compressed protocol IDs. This parameter allows us to interoperate with | ||
17 | them. The default value of the configurable parameter is the same as the | ||
18 | current behavior: protocol compression is enabled. If protocol compression | ||
19 | is disabled we will not send compressed protocol IDs. | ||
20 | |||
21 | This is based on an earlier patch by Bob Gilligan (using a sysctl). | ||
22 | Module parameter is writable to allow for enabling even if ppp | ||
23 | is already loaded for other uses. | ||
24 | |||
25 | Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> | ||
26 | Acked-by: Eric Dumazet <eric.dumazet@gmail.com> | ||
27 | Acked-by: Paul Mackerras <paulus@samba.org> | ||
28 | Signed-off-by: David S. Miller <davem@davemloft.net> | ||
29 | --- | ||
30 | drivers/net/ppp_generic.c | 9 +++++++-- | ||
31 | 1 files changed, 7 insertions(+), 2 deletions(-) | ||
32 | |||
33 | diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c | ||
34 | index 3965997..89294b4 100644 | ||
35 | --- a/drivers/net/ppp_generic.c | ||
36 | +++ b/drivers/net/ppp_generic.c | ||
37 | @@ -1285,6 +1285,11 @@ ppp_push(struct ppp *ppp) | ||
38 | } | ||
39 | |||
40 | #ifdef CONFIG_PPP_MULTILINK | ||
41 | +static bool mp_protocol_compress __read_mostly = true; | ||
42 | +module_param(mp_protocol_compress, bool, S_IRUGO | S_IWUSR); | ||
43 | +MODULE_PARM_DESC(mp_protocol_compress, | ||
44 | + "compress protocol id in multilink fragments"); | ||
45 | + | ||
46 | /* | ||
47 | * Divide a packet to be transmitted into fragments and | ||
48 | * send them out the individual links. | ||
49 | @@ -1347,10 +1352,10 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | ||
50 | if (nfree == 0 || nfree < navail / 2) | ||
51 | return 0; /* can't take now, leave it in xmit_pending */ | ||
52 | |||
53 | - /* Do protocol field compression (XXX this should be optional) */ | ||
54 | + /* Do protocol field compression */ | ||
55 | p = skb->data; | ||
56 | len = skb->len; | ||
57 | - if (*p == 0) { | ||
58 | + if (*p == 0 && mp_protocol_compress) { | ||
59 | ++p; | ||
60 | --len; | ||
61 | } | ||
62 | -- | ||
63 | 1.6.6.1 | ||
64 | |||