lkml.org 
[lkml]   [1996]   [Jul]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjecttunnel device fix
Date
Hello!

With this fix (and fixed skb->arp bug in ip_output.c)
tunnel works. At least, I failed to break it.

It passed (all these test failed without these fixes):
ping -f -s 8000 <other end>
ping -f -s 8000 -I <our end> 224.0.0.1
Transferred 80Mb of news and ftp 180Mb file
with couple of dozens of route changes tunnel <-> ethernet!

Well, when route changes ip_fragment complains a lot at ip_fragment:
- if(skb->free==0)
- printk(KERN_ERR "IP fragmenter: BUG free!=1 in fragmenter\n");

It is wrong, fragmenting queued skb is not bug. Why not?

The only bug, that I see now: incorrect ttl value.
It can be easily fixed by adding new flag IPFWD_NOTTLDEC to is_frag
argument of ip_forward.

Alexey Kuznetsov.



drivers/net/new_tunnel.c:

- if (skb_headroom(skb) >= max_headroom) {
+ if (skb_headroom(skb) >= max_headroom && skb->free) {
skb->h.iph = (struct iphdr *) skb_push(skb, tunnel_hlen);
+ if (skb->sk)
+ {
+ atomic_sub(skb->truesize, &skb->sk->wmem_alloc);
+ skb->sk->write_space(skb->sk);
+ skb->sk = NULL;
+ }
+ skb_device_unlock(skb);
} else {

if (skb->sk)
{
....
}
seems redundant, but added just for safety.


\
 
 \ /
  Last update: 2005-03-22 13:37    [W:0.033 / U:11.632 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site