* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
@ 2002-08-30 14:19 pavel
0 siblings, 0 replies; 9+ messages in thread
From: pavel @ 2002-08-30 14:19 UTC (permalink / raw)
To: linux-kernel
> I'm using the generic hdlc layer with PPP protocol
against a Lucent MAX6000.
> Everything works OK but there a kernel message bothering
me:
> protocol 0008 is buggy, dev hdlc0
>
> I get this message nearly once per minute.
>
> Do anyone know what is this message about ?
I've seen that problem since 2.2.x kernels.
I think there is an error while building cisco/ppp
keepalive packet (hdlc.c & syncppp.c).
Lines skb->nh.raw = skb->data;
will solve it.
Following patch is for 2.2.x kernel.
If you want to patch 2.4.x, simply add
skb->nh.raw = skb->data;
at cisco_keepalive_send (hdlc.c)
at sppp_cisco_send (syncppp.c)
and at sppp_cp_send (syncppp.c)
Here is a patch(for hdlc.c & syncppp.c from 2.2.x):
==========================
diff -urN kernel-source-2.2.17.orig/drivers/net/hdlc.c
kernel-source-2.2.17.hdlc_patch/drivers/net/hdlc.c
--- kernel-source-2.2.17.orig/drivers/net/hdlc.c Sat Jun 24
15:25:37 2000
+++ kernel-source-2.2.17.hdlc_patch/drivers/net/hdlc.c Fri
Mar 22 19:51:41 2002
@@ -19,6 +19,13 @@
*
* Use sethdlc utility to set line parameters, protocol
and PVCs
*/
+ /*
+ Patched by Pavel Selivanov. 08 Aug. 2001
+ If we are using dev_queue_xmit, and we have a
listeners,
+ we should set skb->nh.raw. If no, we'll get a lot of
warnings in
+ /var/log/debug
+ Look at core/net/dev.c dev_queue_xmit_nit
+*/
#include <linux/config.h>
#include <linux/module.h>
@@ -99,6 +106,7 @@
skb_put(skb, sizeof(cisco_packet));
skb->priority=TC_PRIO_CONTROL;
skb->dev = hdlc_to_dev(hdlc);
+ skb->nh.raw = skb->data;
dev_queue_xmit(skb);
}
@@ -369,7 +377,8 @@
skb_put(skb, i);
skb->priority=TC_PRIO_CONTROL;
skb->dev = hdlc_to_dev(hdlc);
-
+ skb->nh.raw = skb->data;
+
dev_queue_xmit(skb);
}
@@ -805,6 +814,7 @@
{
pvc_device *pvc=dev_to_pvc(dev);
+ skb->nh.raw = skb->data;
if (pvc->state & PVC_STATE_ACTIVE) {
skb->dev = hdlc_to_dev(pvc->master);
pvc->stats.tx_bytes+=skb->len;
diff -urN kernel-source-2.2.17.orig/drivers/net/syncppp.c
kernel-source-2.2.17.hdlc_patch/drivers/net/syncppp.c
--- kernel-source-2.2.17.orig/drivers/net/syncppp.c Thu Jun
8 04:26:43 2000
+++
kernel-source-2.2.17.hdlc_patch/drivers/net/syncppp.c Fri
Mar 22 19:51:41 2002
@@ -16,7 +16,14 @@
*
* Port for Linux-2.1 by Jan "Yenya" Kasprzak
<kas@fi.muni.cz>
*/
-
+ /*
+ Patched by Pavel Selivanov. 08 Aug. 2001
+ If we are using dev_queue_xmit, and we have a listeners,
+ we should set skb->nh.raw. If no, we'll get a lot of
warnings in
+ /var/log/debug
+ Look at core/net/dev.c dev_queue_xmit_nit
+*/
+
/*
* Synchronous PPP/Cisco link level subroutines.
* Keepalive protocol implemented in both Cisco and PPP
modes.
@@ -779,6 +786,8 @@
/* Control is high priority so it doesnt get queued
behind data */
skb->priority=TC_PRIO_CONTROL;
skb->dev = dev;
+ skb->nh.raw = skb->data;
+
dev_queue_xmit(skb);
}
@@ -821,6 +830,8 @@
sp->obytes += skb->len;
skb->priority=TC_PRIO_CONTROL;
skb->dev = dev;
+ skb->nh.raw = skb->data;
+
dev_queue_xmit(skb);
}
======================
Regards
Pavel
mail: pavel[AT]parabel.inc.ru
^ permalink raw reply [flat|nested] 9+ messages in thread* [GENERIC HDLC LAYER] Messages of a hdlc device
@ 2002-07-15 14:11 henrique
2002-07-16 12:11 ` henrique
2002-07-16 13:10 ` Krzysztof Halasa
0 siblings, 2 replies; 9+ messages in thread
From: henrique @ 2002-07-15 14:11 UTC (permalink / raw)
To: linux-kernel; +Cc: khc
Hello Halasa !!!
I'm using the generic hdlc layer with PPP protocol against a Lucent MAX6000.
Everything works OK but there a kernel message bothering me:
protocol 0008 is buggy, dev hdlc0
I get this message nearly once per minute.
Do anyone know what is this message about ?
Must I worry about that ?
thanks in advance
---
Henrique Gobbi
Software Engineer
+55 11 50333339
Cyclades Corporation
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
2002-07-15 14:11 henrique
@ 2002-07-16 12:11 ` henrique
2002-07-16 13:52 ` Krzysztof Halasa
2002-07-16 13:10 ` Krzysztof Halasa
1 sibling, 1 reply; 9+ messages in thread
From: henrique @ 2002-07-16 12:11 UTC (permalink / raw)
To: linux-kernel; +Cc: khc
Hello !!!
Are Halasa still maintaining the GENERIC HDLC LAYER ?
If not, how is the maintainer ?
regards
henrique
On Monday 15 July 2002 11:11 am, henrique wrote:
> Hello Halasa !!!
>
> I'm using the generic hdlc layer with PPP protocol against a Lucent
> MAX6000. Everything works OK but there a kernel message bothering me:
>
> protocol 0008 is buggy, dev hdlc0
>
> I get this message nearly once per minute.
>
> Do anyone know what is this message about ?
> Must I worry about that ?
>
> thanks in advance
> ---
> Henrique Gobbi
> Software Engineer
> +55 11 50333339
> Cyclades Corporation
--
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
2002-07-16 12:11 ` henrique
@ 2002-07-16 13:52 ` Krzysztof Halasa
0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Halasa @ 2002-07-16 13:52 UTC (permalink / raw)
To: henrique; +Cc: linux-kernel
henrique <henrique@cyclades.com> writes:
> Are Halasa still maintaining the GENERIC HDLC LAYER ?
Well... I think I, Krzysztof Halasa, still do that.
Not that I have much time for such things - at least for now I'm limited
to patching things and possibly working on 2.5 version.
--
Krzysztof Halasa
Network Administrator
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
2002-07-15 14:11 henrique
2002-07-16 12:11 ` henrique
@ 2002-07-16 13:10 ` Krzysztof Halasa
2002-07-16 13:58 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 9+ messages in thread
From: Krzysztof Halasa @ 2002-07-16 13:10 UTC (permalink / raw)
To: linux-kernel
henrique <henrique@cyclades.com> writes:
> I'm using the generic hdlc layer with PPP protocol against a Lucent MAX6000.
> Everything works OK but there a kernel message bothering me:
>
> protocol 0008 is buggy, dev hdlc0
>
> I get this message nearly once per minute.
>
> Do anyone know what is this message about ?
Not sure what exactly causes it. I was getting it while running tcpdump
on PPP device.
> Must I worry about that ?
No.
--
Krzysztof Halasa
Network Administrator
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
2002-07-16 13:10 ` Krzysztof Halasa
@ 2002-07-16 13:58 ` Arnaldo Carvalho de Melo
2002-07-16 14:06 ` Krzysztof Halasa
2002-07-16 15:48 ` Bob Dunlop
0 siblings, 2 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2002-07-16 13:58 UTC (permalink / raw)
To: Krzysztof Halasa; +Cc: linux-kernel
Em Tue, Jul 16, 2002 at 03:10:33PM +0200, Krzysztof Halasa escreveu:
> henrique <henrique@cyclades.com> writes:
>
> > I'm using the generic hdlc layer with PPP protocol against a Lucent MAX6000.
> > Everything works OK but there a kernel message bothering me:
> >
> > protocol 0008 is buggy, dev hdlc0
> >
> > I get this message nearly once per minute.
> >
> > Do anyone know what is this message about ?
> Not sure what exactly causes it. I was getting it while running tcpdump
> on PPP device.
This is becoming a FAQ... see net/core/dev.c, line 907 on 2.5:
/* skb->nh should be correctly
set by sender, so that the second statement is
just protection against buggy protocols.
*/
skb2->mac.raw = skb2->data;
if (skb2->nh.raw < skb2->data || skb2->nh.raw > skb2->tail) {
if (net_ratelimit())
printk(KERN_DEBUG "protocol %04x is buggy, dev %s\n",
skb2->protocol, dev->name);
skb2->nh.raw = skb2->data;
}
- Arnaldo
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
2002-07-16 13:58 ` Arnaldo Carvalho de Melo
@ 2002-07-16 14:06 ` Krzysztof Halasa
2002-07-16 15:48 ` Bob Dunlop
1 sibling, 0 replies; 9+ messages in thread
From: Krzysztof Halasa @ 2002-07-16 14:06 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo; +Cc: linux-kernel
Arnaldo Carvalho de Melo <acme@conectiva.com.br> writes:
> This is becoming a FAQ... see net/core/dev.c, line 907 on 2.5:
>
> /* skb->nh should be correctly
> set by sender, so that the second statement is
> just protection against buggy protocols.
> */
> skb2->mac.raw = skb2->data;
>
> if (skb2->nh.raw < skb2->data || skb2->nh.raw > skb2->tail) {
> if (net_ratelimit())
> printk(KERN_DEBUG "protocol %04x is buggy, dev %s\n",
> skb2->protocol, dev->name);
> skb2->nh.raw = skb2->data;
> }
Sure I know thats it, but I remember checking the code which resulted
in nothing. Don't remember details, so I'll look at it again.
--
Krzysztof Halasa
Network Administrator
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
2002-07-16 13:58 ` Arnaldo Carvalho de Melo
2002-07-16 14:06 ` Krzysztof Halasa
@ 2002-07-16 15:48 ` Bob Dunlop
2002-07-16 10:56 ` Arnaldo Carvalho de Melo
1 sibling, 1 reply; 9+ messages in thread
From: Bob Dunlop @ 2002-07-16 15:48 UTC (permalink / raw)
To: Arnaldo Carvalho de Melo, Krzysztof Halasa, linux-kernel
Hi,
On Tue, Jul 16, Arnaldo Carvalho de Melo wrote:
> Em Tue, Jul 16, 2002 at 03:10:33PM +0200, Krzysztof Halasa escreveu:
> > henrique <henrique@cyclades.com> writes:
> >
> > > I'm using the generic hdlc layer with PPP protocol against a Lucent MAX6000.
> > > Everything works OK but there a kernel message bothering me:
> > >
> > > protocol 0008 is buggy, dev hdlc0
> > >
> > > I get this message nearly once per minute.
> > >
> > > Do anyone know what is this message about ?
>
> > Not sure what exactly causes it. I was getting it while running tcpdump
> > on PPP device.
>
> This is becoming a FAQ... see net/core/dev.c, line 907 on 2.5:
>
> /* skb->nh should be correctly
> set by sender, so that the second statement is
> just protection against buggy protocols.
> */
> skb2->mac.raw = skb2->data;
>
> if (skb2->nh.raw < skb2->data || skb2->nh.raw > skb2->tail) {
> if (net_ratelimit())
> printk(KERN_DEBUG "protocol %04x is buggy, dev %s\n",
> skb2->protocol, dev->name);
> skb2->nh.raw = skb2->data;
> }
Not exactly a FAQ answer though. How about:
The error would appear to be benign. Something in the protocol stack is
not setting one of the header fields correctly and this code has corrected
the fault.
This error is only seen when running network monitoring software such as
tcpdump as that is the only time the particular code path that detects
the error is followed.
Also shouldn't that be:
> printk(KERN_DEBUG "protocol %04x is buggy, dev %s\n",
> htons(skb2->protocol), dev->name);
--
Bob Dunlop
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: [GENERIC HDLC LAYER] Messages of a hdlc device
2002-07-16 15:48 ` Bob Dunlop
@ 2002-07-16 10:56 ` Arnaldo Carvalho de Melo
0 siblings, 0 replies; 9+ messages in thread
From: Arnaldo Carvalho de Melo @ 2002-07-16 10:56 UTC (permalink / raw)
To: Bob Dunlop; +Cc: Krzysztof Halasa, linux-kernel
Em Tue, Jul 16, 2002 at 04:48:17PM +0100, Bob Dunlop escreveu:
> > This is becoming a FAQ... see net/core/dev.c, line 907 on 2.5:
> >
> > /* skb->nh should be correctly
> > set by sender, so that the second statement is
> > just protection against buggy protocols.
> > */
<SNIP>
> Not exactly a FAQ answer though:
Agreed, but I talked with Henrique privately (in portuguese) and give a
long explanation with examples of how to fix that.
- Arnaldo
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-08-30 14:12 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-08-30 14:19 [GENERIC HDLC LAYER] Messages of a hdlc device pavel
-- strict thread matches above, loose matches on Subject: below --
2002-07-15 14:11 henrique
2002-07-16 12:11 ` henrique
2002-07-16 13:52 ` Krzysztof Halasa
2002-07-16 13:10 ` Krzysztof Halasa
2002-07-16 13:58 ` Arnaldo Carvalho de Melo
2002-07-16 14:06 ` Krzysztof Halasa
2002-07-16 15:48 ` Bob Dunlop
2002-07-16 10:56 ` Arnaldo Carvalho de Melo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox