diff options
author | stephen hemminger <shemminger@vyatta.com> | 2010-12-20 12:58:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-12-28 16:53:39 -0500 |
commit | d39cd5e99a0ad88aba6793fb5e5f34e29cda6e6f (patch) | |
tree | fa737e64cea249ffb703de1e7c717f7dd924e372 /drivers | |
parent | c4711786986af0cce654f493426ee0a1055e4b17 (diff) |
ppp: allow disabling multilink protocol ID compression
Linux would not connect to other router running old version Cisco IOS (12.0).
This is most likely a bug in that version of IOS, since it is fixed
in later versions. As a workaround this patch allows a module parameter
to be set to disable compressing the protocol ID.
See: https://bugzilla.vyatta.com/show_bug.cgi?id=3979
RFC 1990 allows an implementation to formulate MP fragments as if protocol
compression had been negotiated. This allows us to always send compressed
protocol IDs. But some implementations don't accept MP fragments with
compressed protocol IDs. This parameter allows us to interoperate with
them. The default value of the configurable parameter is the same as the
current behavior: protocol compression is enabled. If protocol compression
is disabled we will not send compressed protocol IDs.
This is based on an earlier patch by Bob Gilligan (using a sysctl).
Module parameter is writable to allow for enabling even if ppp
is already loaded for other uses.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Acked-by: Paul Mackerras <paulus@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/ppp_generic.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/net/ppp_generic.c b/drivers/net/ppp_generic.c index 39659976a1ac..89294b43c4a9 100644 --- a/drivers/net/ppp_generic.c +++ b/drivers/net/ppp_generic.c | |||
@@ -1285,6 +1285,11 @@ ppp_push(struct ppp *ppp) | |||
1285 | } | 1285 | } |
1286 | 1286 | ||
1287 | #ifdef CONFIG_PPP_MULTILINK | 1287 | #ifdef CONFIG_PPP_MULTILINK |
1288 | static bool mp_protocol_compress __read_mostly = true; | ||
1289 | module_param(mp_protocol_compress, bool, S_IRUGO | S_IWUSR); | ||
1290 | MODULE_PARM_DESC(mp_protocol_compress, | ||
1291 | "compress protocol id in multilink fragments"); | ||
1292 | |||
1288 | /* | 1293 | /* |
1289 | * Divide a packet to be transmitted into fragments and | 1294 | * Divide a packet to be transmitted into fragments and |
1290 | * send them out the individual links. | 1295 | * send them out the individual links. |
@@ -1347,10 +1352,10 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) | |||
1347 | if (nfree == 0 || nfree < navail / 2) | 1352 | if (nfree == 0 || nfree < navail / 2) |
1348 | return 0; /* can't take now, leave it in xmit_pending */ | 1353 | return 0; /* can't take now, leave it in xmit_pending */ |
1349 | 1354 | ||
1350 | /* Do protocol field compression (XXX this should be optional) */ | 1355 | /* Do protocol field compression */ |
1351 | p = skb->data; | 1356 | p = skb->data; |
1352 | len = skb->len; | 1357 | len = skb->len; |
1353 | if (*p == 0) { | 1358 | if (*p == 0 && mp_protocol_compress) { |
1354 | ++p; | 1359 | ++p; |
1355 | --len; | 1360 | --len; |
1356 | } | 1361 | } |