2002-10-31 05:40:37

by Randy.Dunlap

[permalink] [raw]
Subject: 2.5.45 ipmr.c syntax error

gcc -Wp,-MD,net/ipv4/.ipmr.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DKBUILD_BASENAME=ipmr -c -o net/ipv4/ipmr.o net/ipv4/ipmr.c
net/ipv4/ipmr.c: In function `ipmr_forward_finish':
net/ipv4/ipmr.c:1114: structure has no member named `pmtu'
net/ipv4/ipmr.c: In function `ipmr_queue_xmit':
net/ipv4/ipmr.c:1170: structure has no member named `pmtu'
make[2]: *** [net/ipv4/ipmr.o] Error 1
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2

On x86 (P4).

~Randy


2002-10-31 05:54:11

by Skip Ford

[permalink] [raw]
Subject: Re: 2.5.45 ipmr.c syntax error

Randy.Dunlap wrote:
> gcc -Wp,-MD,net/ipv4/.ipmr.o.d -D__KERNEL__ -Iinclude -Wall
> -Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
> -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
> -march=i686 -Iarch/i386/mach-generic -nostdinc -iwithprefix include
> -DKBUILD_BASENAME=ipmr -c -o net/ipv4/ipmr.o net/ipv4/ipmr.c
> net/ipv4/ipmr.c: In function `ipmr_forward_finish':
> net/ipv4/ipmr.c:1114: structure has no member named `pmtu'
> net/ipv4/ipmr.c: In function `ipmr_queue_xmit':
> net/ipv4/ipmr.c:1170: structure has no member named `pmtu'
> make[2]: *** [net/ipv4/ipmr.o] Error 1
> make[1]: *** [net/ipv4] Error 2
> make: *** [net] Error 2


--- linux/net/ipv4/ipmr.c~ Thu Oct 31 01:54:40 2002
+++ linux/net/ipv4/ipmr.c Thu Oct 31 01:55:31 2002
@@ -1111,7 +1111,7 @@
{
struct dst_entry *dst = skb->dst;

- if (skb->len <= dst->pmtu)
+ if (skb->len <= dst_pmtu(dst))
return dst->output(skb);
else
return ip_fragment(skb, dst->output);
@@ -1167,7 +1167,7 @@

dev = rt->u.dst.dev;

- if (skb->len+encap > rt->u.dst.pmtu && (ntohs(iph->frag_off) & IP_DF)) {
+ if (skb->len+encap > dst_pmtu(rt->u.dst) && (ntohs(iph->frag_off) & IP_DF)) {
/* Do not fragment multicasts. Alas, IPv4 does not
allow to send ICMP, so that packets will disappear
to blackhole.

--
Skip

2002-10-31 11:53:07

by Jochen Friedrich

[permalink] [raw]
Subject: Re: 2.5.45 ipmr.c syntax error

Hi Skip,

> - if (skb->len+encap > rt->u.dst.pmtu && (ntohs(iph->frag_off) & IP_DF)) {
> + if (skb->len+encap > dst_pmtu(rt->u.dst) && (ntohs(iph->frag_off) & IP_DF)) {

Shouldn't that be dst_pmtu(&rt->u.dst)?

--jochen

2002-10-31 22:45:38

by Skip Ford

[permalink] [raw]
Subject: Re: 2.5.45 ipmr.c syntax error

Jochen Friedrich wrote:
> Hi Skip,
>
> > - if (skb->len+encap > rt->u.dst.pmtu && (ntohs(iph->frag_off) & IP_DF)) {
> > + if (skb->len+encap > dst_pmtu(rt->u.dst) && (ntohs(iph->frag_off) & IP_DF)) {
>
> Shouldn't that be dst_pmtu(&rt->u.dst)?

Yep, you're right. Thanks.


--- linux/net/ipv4/ipmr.c~ Thu Oct 31 01:54:40 2002
+++ linux/net/ipv4/ipmr.c Thu Oct 31 01:55:31 2002
@@ -1111,7 +1111,7 @@
{
struct dst_entry *dst = skb->dst;

- if (skb->len <= dst->pmtu)
+ if (skb->len <= dst_pmtu(dst))
return dst->output(skb);
else
return ip_fragment(skb, dst->output);
@@ -1167,7 +1167,7 @@

dev = rt->u.dst.dev;

- if (skb->len+encap > rt->u.dst.pmtu && (ntohs(iph->frag_off) & IP_DF)) {
+ if (skb->len+encap > dst_pmtu(&rt->u.dst) && (ntohs(iph->frag_off) & IP_DF)) {
/* Do not fragment multicasts. Alas, IPv4 does not
allow to send ICMP, so that packets will disappear
to blackhole.

--
Skip

2002-11-01 01:22:02

by Miles Lane

[permalink] [raw]
Subject: Re: 2.5.45 ipmr.c syntax error

Skip, I tried your patch from:
http://marc.theaimsgroup.com/?l=linux-kernel&m=103604415923099&w=2

I got the following error after applying it:

gcc -Wp,-MD,net/ipv4/.ipmr.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
-march=athlon -Iarch/i386/mach-generic -nostdinc -iwithprefix include
-DKBUILD_BASENAME=ipmr -c -o net/ipv4/ipmr.o net/ipv4/ipmr.c
net/ipv4/ipmr.c: In function `ipmr_queue_xmit':
net/ipv4/ipmr.c:1170: incompatible type for argument 1 of `dst_pmtu'
make[2]: *** [net/ipv4/ipmr.o] Error 1
make[1]: *** [net/ipv4] Error 2
make: *** [net] Error 2



2002-11-01 02:10:55

by Skip Ford

[permalink] [raw]
Subject: Re: 2.5.45 ipmr.c syntax error

Miles Lane wrote:
> Skip, I tried your patch from:
> http://marc.theaimsgroup.com/?l=linux-kernel&m=103604415923099&w=2

I goofed with that patch. This is the correct one. Sorry about that.


--- linux/net/ipv4/ipmr.c~ Thu Oct 31 01:54:40 2002
+++ linux/net/ipv4/ipmr.c Thu Oct 31 01:55:31 2002
@@ -1111,7 +1111,7 @@
{
struct dst_entry *dst = skb->dst;

- if (skb->len <= dst->pmtu)
+ if (skb->len <= dst_pmtu(dst))
return dst->output(skb);
else
return ip_fragment(skb, dst->output);
@@ -1167,7 +1167,7 @@

dev = rt->u.dst.dev;

- if (skb->len+encap > rt->u.dst.pmtu && (ntohs(iph->frag_off) & IP_DF)) {
+ if (skb->len+encap > dst_pmtu(&rt->u.dst) && (ntohs(iph->frag_off) & IP_DF)) {
/* Do not fragment multicasts. Alas, IPv4 does not
allow to send ICMP, so that packets will disappear
to blackhole.

--
Skip