netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ppp: allow disabling multilink protocol ID compression
@ 2010-12-21  3:58 Stephen Hemminger
  2010-12-21  5:43 ` Eric Dumazet
  2010-12-21 22:44 ` Paul Mackerras
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2010-12-21  3:58 UTC (permalink / raw)
  To: Paul Mackerras; +Cc: linux-ppp, netdev

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>

--- a/drivers/net/ppp_generic.c	2010-12-17 10:01:42.004531762 -0800
+++ b/drivers/net/ppp_generic.c	2010-12-20 18:58:16.677310954 -0800
@@ -1283,6 +1283,11 @@ ppp_push(struct ppp *ppp)
 }
 
 #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
  * send them out the individual links.
@@ -1345,10 +1350,10 @@ static int ppp_mp_explode(struct ppp *pp
 	if (nfree == 0 || nfree < navail / 2)
 		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;
 	len = skb->len;
-	if (*p == 0) {
+	if (*p == 0 && mp_protocol_compress) {
 		++p;
 		--len;
 	}

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ppp: allow disabling multilink protocol ID compression
  2010-12-21  3:58 [PATCH] ppp: allow disabling multilink protocol ID compression Stephen Hemminger
@ 2010-12-21  5:43 ` Eric Dumazet
  2010-12-21 22:44 ` Paul Mackerras
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Dumazet @ 2010-12-21  5:43 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Paul Mackerras, linux-ppp, netdev

Le lundi 20 décembre 2010 à 19:58 -0800, Stephen Hemminger a écrit :
> 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>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ppp: allow disabling multilink protocol ID compression
  2010-12-21  3:58 [PATCH] ppp: allow disabling multilink protocol ID compression Stephen Hemminger
  2010-12-21  5:43 ` Eric Dumazet
@ 2010-12-21 22:44 ` Paul Mackerras
  2010-12-28 21:53   ` David Miller
  1 sibling, 1 reply; 4+ messages in thread
From: Paul Mackerras @ 2010-12-21 22:44 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: linux-ppp, netdev

On Mon, Dec 20, 2010 at 07:58:33PM -0800, Stephen Hemminger wrote:

> 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: Paul Mackerras <paulus@samba.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ppp: allow disabling multilink protocol ID compression
  2010-12-21 22:44 ` Paul Mackerras
@ 2010-12-28 21:53   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2010-12-28 21:53 UTC (permalink / raw)
  To: paulus; +Cc: shemminger, linux-ppp, netdev

From: Paul Mackerras <paulus@samba.org>
Date: Wed, 22 Dec 2010 09:44:00 +1100

> On Mon, Dec 20, 2010 at 07:58:33PM -0800, Stephen Hemminger wrote:
> 
>> 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: Paul Mackerras <paulus@samba.org>

Applied, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-12-28 21:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21  3:58 [PATCH] ppp: allow disabling multilink protocol ID compression Stephen Hemminger
2010-12-21  5:43 ` Eric Dumazet
2010-12-21 22:44 ` Paul Mackerras
2010-12-28 21:53   ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).