lkml.org 
[lkml]   [1996]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: Problems with the IP tunnel
Jon Tombs (jon@gte.ESi.US.ES) wrote:

: Looking at new_tunnel.c there are a few things I don't understand.
: ...
: memcpy(new_skb->ip_hdr, skb->data, skb->len);
: This copies the data - OK
: memset(new_skb->proto_priv, 0, sizeof(skb->proto_priv));
: Zero the proto_priv field - WHY don't we copy?

This field is used by precompiled IP options (name was obscured
deliberately in order to core/* not to depend on IP layer).
new_tunnel is about to build new IP header without IP options,
so that we must clear it.

: WHY don't we copy the other fields from the old skb?
: i.e. what about saddr,daddr,raddr and pkt_type??


ip_forward need not saddr,daddr and fills raddr itself.
pkt_type is set to PKT_HOST by alloc_skb, that is correct.

Alexey Kuznetsov.


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