All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: jorge@dti2.net
Cc: netdev@vger.kernel.org, linux-ppp@vger.kernel.org
Subject: Re: [RFC PATCH v2 2/4] ppp_mppe: check coherency counter for out-of-order sequencing
Date: Tue, 21 May 2013 18:40:09 +0000	[thread overview]
Message-ID: <519BBF89.1040900@cogentembedded.com> (raw)
In-Reply-To: <1369160304-31967-2-git-send-email-jorge@dti2.net>

Hello.

On 05/21/2013 10:18 PM, Jorge Boncompte [DTI2] wrote:

> From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
>
> While testing a L2TP tunnel without sequencing with MPPE encryption in
> stateless mode noticed that after a packet was reordered the encapsulated
> traffic session was stuck but testing against a Cisco gear did work.
>
>  From RFC3078 "MPPE expects packets to be delivered in sequence".
>
> The thing it's that the ppp_mppe module treats the reorder as if the
> coherency counter did wrap and rekeys all the "missing" packets.
>
> The link layer protocol should deliver the packets in order but at least
> with this patch in place the decryption process survives some packet reorder.
>
> Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
> ---
>   drivers/net/ppp/ppp_mppe.c |   23 ++++++++++++++++++++++-
>   1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp/ppp_mppe.c
> index 9a1849a..97f4804 100644
> --- a/drivers/net/ppp/ppp_mppe.c
> +++ b/drivers/net/ppp/ppp_mppe.c
[...]
> @@ -547,6 +559,15 @@ mppe_decompress(void *arg, unsigned char *ibuf, int isize, unsigned char *obuf,
>   	 */
>   
>   	if (!state->stateful) {
> +		if (mppe_cmp_ccount(ccount, state->ccount) < 0) {
> +			if (net_ratelimit())
> +				printk(KERN_WARNING "%s[%d]: Dropping out-of-order "

     Why not pr_warn()?

WBR, Sergei


WARNING: multiple messages have this Message-ID (diff)
From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
To: jorge@dti2.net
Cc: netdev@vger.kernel.org, linux-ppp@vger.kernel.org
Subject: Re: [RFC PATCH v2 2/4] ppp_mppe: check coherency counter for out-of-order sequencing
Date: Tue, 21 May 2013 22:40:09 +0400	[thread overview]
Message-ID: <519BBF89.1040900@cogentembedded.com> (raw)
In-Reply-To: <1369160304-31967-2-git-send-email-jorge@dti2.net>

Hello.

On 05/21/2013 10:18 PM, Jorge Boncompte [DTI2] wrote:

> From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
>
> While testing a L2TP tunnel without sequencing with MPPE encryption in
> stateless mode noticed that after a packet was reordered the encapsulated
> traffic session was stuck but testing against a Cisco gear did work.
>
>  From RFC3078 "MPPE expects packets to be delivered in sequence".
>
> The thing it's that the ppp_mppe module treats the reorder as if the
> coherency counter did wrap and rekeys all the "missing" packets.
>
> The link layer protocol should deliver the packets in order but at least
> with this patch in place the decryption process survives some packet reorder.
>
> Signed-off-by: Jorge Boncompte [DTI2] <jorge@dti2.net>
> ---
>   drivers/net/ppp/ppp_mppe.c |   23 ++++++++++++++++++++++-
>   1 file changed, 22 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ppp/ppp_mppe.c b/drivers/net/ppp/ppp_mppe.c
> index 9a1849a..97f4804 100644
> --- a/drivers/net/ppp/ppp_mppe.c
> +++ b/drivers/net/ppp/ppp_mppe.c
[...]
> @@ -547,6 +559,15 @@ mppe_decompress(void *arg, unsigned char *ibuf, int isize, unsigned char *obuf,
>   	 */
>   
>   	if (!state->stateful) {
> +		if (mppe_cmp_ccount(ccount, state->ccount) < 0) {
> +			if (net_ratelimit())
> +				printk(KERN_WARNING "%s[%d]: Dropping out-of-order "

     Why not pr_warn()?

WBR, Sergei

  parent reply	other threads:[~2013-05-21 18:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21 18:18 [RFC PATCH v2 1/4] ppp: adds new error for decompressors to signal that packet must be dropped Jorge Boncompte [DTI2]
2013-05-21 18:18 ` Jorge Boncompte [DTI2]
2013-05-21 18:18 ` [RFC PATCH v2 2/4] ppp_mppe: check coherency counter for out-of-order sequencing Jorge Boncompte [DTI2]
2013-05-21 18:18   ` Jorge Boncompte [DTI2]
2013-05-21 18:36   ` Eric Dumazet
2013-05-21 18:36     ` Eric Dumazet
2013-05-21 18:40   ` Sergei Shtylyov [this message]
2013-05-21 18:40     ` Sergei Shtylyov
2013-05-21 18:18 ` [RFC PATCH v2 3/4] ppp_mppe: cleanup kernel log messages Jorge Boncompte [DTI2]
2013-05-21 18:18   ` Jorge Boncompte [DTI2]
2013-05-21 18:40   ` Joe Perches
2013-05-21 18:40     ` Joe Perches
2013-05-21 18:18 ` [RFC PATCH v2 4/4] ppp_mppe: style cleanup Jorge Boncompte [DTI2]
2013-05-21 18:18   ` Jorge Boncompte [DTI2]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=519BBF89.1040900@cogentembedded.com \
    --to=sergei.shtylyov@cogentembedded.com \
    --cc=jorge@dti2.net \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.