[opensuse-kernel] Gre tunnel probs after kernel update
Hi, after a kernel update from 2.6.27.45 to 2.6.27.48 (update SUSE-SA:2010:031) i have problems with the gre tunnels in our intranet. The tunnels are visible, but making a tcpdump from a remote endpoint i get the error message protocol 47 unreachable, length 100. Looking for help. best regardings Wolfgang -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
after a kernel update from 2.6.27.45 to 2.6.27.48 (update SUSE-SA:2010:031) i have problems with the gre tunnels in our intranet. The tunnels are visible, but making a tcpdump from a remote endpoint i get the error message protocol 47 unreachable, length 100.
The problem is the change of the ip_gre module in ip_gre.c in the __init ipgre_init(void) function. The parenthesis is missing. static int __init ipgre_init(void) { int err; printk(KERN_INFO "GRE over IPv4 tunneling driver\n"); + err = register_pernet_gen_device(&ipgre_net_id, &ipgre_net_ops); + if (err < 0) + printk(KERN_INFO "ipgre init: can't register device\n"); + return err; + if (inet_add_protocol(&ipgre_protocol, IPPROTO_GRE) < 0) { printk(KERN_INFO "ipgre init: can't add protocol\n"); + unregister_pernet_gen_device(ipgre_net_id, &ipgre_net_ops); return -EAGAIN; } - err = register_pernet_gen_device(&ipgre_net_id, &ipgre_net_ops); - if (err < 0) - inet_del_protocol(&ipgre_protocol, IPPROTO_GRE); - return err; } best regardings Wolfgang -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On 07/23/2010 05:17 AM, Wolfgang Pawlowski wrote:
after a kernel update from 2.6.27.45 to 2.6.27.48 (update SUSE-SA:2010:031) i have problems with the gre tunnels in our intranet. The tunnels are visible, but making a tcpdump from a remote endpoint i get the error message protocol 47 unreachable, length 100.
The problem is the change of the ip_gre module in ip_gre.c in the __init ipgre_init(void) function. The parenthesis is missing.
static int __init ipgre_init(void) { int err;
printk(KERN_INFO "GRE over IPv4 tunneling driver\n");
+ err = register_pernet_gen_device(&ipgre_net_id, &ipgre_net_ops); + if (err < 0) + printk(KERN_INFO "ipgre init: can't register device\n"); + return err; +
Your indenting implies that you want braces around the printk and return statements. If not, the rest of the routine is unneeded. Larry -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
On Fri, Jul 23, 2010 at 08:06:01AM -0500, Larry Finger wrote:
On 07/23/2010 05:17 AM, Wolfgang Pawlowski wrote:
after a kernel update from 2.6.27.45 to 2.6.27.48 (update SUSE-SA:2010:031) i have problems with the gre tunnels in our intranet. The tunnels are visible, but making a tcpdump from a remote endpoint i get the error message protocol 47 unreachable, length 100.
The problem is the change of the ip_gre module in ip_gre.c in the __init ipgre_init(void) function. The parenthesis is missing.
static int __init ipgre_init(void) { int err;
printk(KERN_INFO "GRE over IPv4 tunneling driver\n");
+ err = register_pernet_gen_device(&ipgre_net_id, &ipgre_net_ops); + if (err < 0) + printk(KERN_INFO "ipgre init: can't register device\n"); + return err; +
Your indenting implies that you want braces around the printk and return statements. If not, the rest of the routine is unneeded.
Of course ... thats what Wolfgang found ;) Ciao, Marcus -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
Hi Larry, On Fri, 23 Jul 2010, 15:06:01 +0200, Larry Finger wrote:
On 07/23/2010 05:17 AM, Wolfgang Pawlowski wrote:
after a kernel update from 2.6.27.45 to 2.6.27.48 (update SUSE-SA:2010:031) i have problems with the gre tunnels in our intranet. The tunnels are visible, but making a tcpdump from a remote endpoint i get the error message protocol 47 unreachable, length 100.
The problem is the change of the ip_gre module in ip_gre.c in the __init ipgre_init(void) function. The parenthesis is missing.
static int __init ipgre_init(void) { int err;
printk(KERN_INFO "GRE over IPv4 tunneling driver\n");
+ err = register_pernet_gen_device(&ipgre_net_id, &ipgre_net_ops); + if (err < 0) + printk(KERN_INFO "ipgre init: can't register device\n"); + return err; +
Your indenting implies that you want braces around the printk and return statements. If not, the rest of the routine is unneeded.
That's exactly the point in Wolfgang's complaint! The patch is wrong in that it fails to add curly braces { } around the statements! It ought to look as follows: if (err < 0) { printk(KERN_INFO "ipgre init: can't register device\n"); return err; } (while I personally prefer to have the opening brace on a separate line...)
Larry
Cheers. l8er manfred -- To unsubscribe, e-mail: opensuse-kernel+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-kernel+help@opensuse.org
participants (4)
-
Larry Finger
-
Manfred Hollstein
-
Marcus Meissner
-
Wolfgang Pawlowski