Skip to contentSkip to conversation

Mail delivery failed: returning message to sender

DISCUSSION David S. Miller 3 participants 4 messages May 21, 2003 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

From: Russell King <[email protected]>
Date: Wed, 21 May 2003 01:21:48 +0100

fragheaderlen 20 maxfraglen 1802201956 mtu 1802201963 fragheaderlen 20 maxfraglen 1802201956 mtu 1802201963

The 1802201956 number is rather interesting. It's 0x6b6b6b6b, which seems to be the slab poison-after.

Russel, thanks for the report.

Alexey, when IP redirect happens during UDP sendfile, all things go to shit. These messages above were generated by a printk in ip_append_data() right after maxfraglen is computed.

I STRONGLY suspect the *rt = *rth assignment in route.c:ip_rt_redirect(). In particular this results in rt->u.dst.path pointing to the old &rth->u.dst, oops.

Russel, please retest using this patch. This piece of code needs to be audited further.

ipv4/route.c renamed from ipv4/route.c.~1~ +1 -0
@@ -964,6 +964,7 @@
 				rt->u.dst.neighbour	= NULL;
 				rt->u.dst.hh		= NULL;
 				rt->u.dst.obsolete	= 0;
+				rt->u.dst.path		= &rt->u.dst;
 
 				rt->rt_flags		|= RTCF_REDIRECTED;
 
#2 lore raw

Hello!

Quoted 3 lines

I STRONGLY suspect the *rt = *rth assignment in route.c:ip_rt_redirect(). In particular this results in rt->u.dst.path pointing to the old &rth->u.dst, oops.

Oops, indeed.

Quoted 2 lines

Russel, please retest using this patch. This piece of code needs to be audited further.

Relax, it is right now.

I hope it is the only place where route is copied as whole.

Alexey

#3 lore raw

From: [email protected]
Date: Wed, 21 May 2003 06:22:10 +0400 (MSD)

Quoted 2 lines

Russel, please retest using this patch. This piece of code needs to be audited further.

Relax, it is right now.

I hope it is the only place where route is copied as whole.

I explicitly zeroed out child and xfrm in my final version. These should never be non-NULL, it is pure paranoia on my part :-)

IP6 makes this more intelligently using ip6_route_copy() function. We should probably make similar beast for ipv4 just for clarity's sake.

#4 lore raw
In reply to David S. Miller
Quoted 2 lines · David S. Miller

Russel, please retest using this patch. This piece of code needs to be audited further.

This appears to fix the problem, thanks.

Quoted 10 lines
ipv4/route.c renamed from ipv4/route.c.~1~ +1 -0
@@ -964,6 +964,7 @@
 				rt->u.dst.neighbour	= NULL;
 				rt->u.dst.hh		= NULL;
 				rt->u.dst.obsolete	= 0;
+				rt->u.dst.path		= &rt->u.dst;
 
 				rt->rt_flags		|= RTCF_REDIRECTED;
 
Signature · 2 lines
Russell King ([email protected])                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html