Commit d39cd5e9 authored by stephen hemminger's avatar stephen hemminger Committed by David S. Miller

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: default avatarStephen Hemminger <shemminger@vyatta.com>
Acked-by: default avatarEric Dumazet <eric.dumazet@gmail.com>
Acked-by: default avatarPaul Mackerras <paulus@samba.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c4711786
...@@ -1285,6 +1285,11 @@ ppp_push(struct ppp *ppp) ...@@ -1285,6 +1285,11 @@ ppp_push(struct ppp *ppp)
} }
#ifdef CONFIG_PPP_MULTILINK #ifdef CONFIG_PPP_MULTILINK
static bool mp_protocol_compress __read_mostly = true;
module_param(mp_protocol_compress, bool, S_IRUGO | S_IWUSR);
MODULE_PARM_DESC(mp_protocol_compress,
"compress protocol id in multilink fragments");
/* /*
* Divide a packet to be transmitted into fragments and * Divide a packet to be transmitted into fragments and
* send them out the individual links. * send them out the individual links.
...@@ -1347,10 +1352,10 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb) ...@@ -1347,10 +1352,10 @@ static int ppp_mp_explode(struct ppp *ppp, struct sk_buff *skb)
if (nfree == 0 || nfree < navail / 2) if (nfree == 0 || nfree < navail / 2)
return 0; /* can't take now, leave it in xmit_pending */ return 0; /* can't take now, leave it in xmit_pending */
/* Do protocol field compression (XXX this should be optional) */ /* Do protocol field compression */
p = skb->data; p = skb->data;
len = skb->len; len = skb->len;
if (*p == 0) { if (*p == 0 && mp_protocol_compress) {
++p; ++p;
--len; --len;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment