netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PROBLEM: a trivial bug in __copy_skb_header() ?
@ 2009-02-20  8:45 Chu XJ
  2009-02-20 12:59 ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 2+ messages in thread
From: Chu XJ @ 2009-02-20  8:45 UTC (permalink / raw)
  To: netdev

Hi, all

     I'm just a newbie of Linux kernel from China. I just wonder
whether it should be "#ifdef CONFIG_XFRM" at the 504th line of
net/core/skbuff.c in the V2.6.28 source tree and previous version.

     PS: Sorry for not using the standard format, my question is too trivial.

Regards
Chu XJ

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PROBLEM: a trivial bug in __copy_skb_header() ?
  2009-02-20  8:45 PROBLEM: a trivial bug in __copy_skb_header() ? Chu XJ
@ 2009-02-20 12:59 ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 2+ messages in thread
From: Arnaldo Carvalho de Melo @ 2009-02-20 12:59 UTC (permalink / raw)
  To: Chu XJ; +Cc: netdev

Em Fri, Feb 20, 2009 at 04:45:33PM +0800, Chu XJ escreveu:
> Hi, all
> 
>      I'm just a newbie of Linux kernel from China. I just wonder
> whether it should be "#ifdef CONFIG_XFRM" at the 504th line of
> net/core/skbuff.c in the V2.6.28 source tree and previous version.

Fairly recent code:

static void __copy_skb_header(struct sk_buff *new, const struct sk_buff *old)
{
        new->tstamp             = old->tstamp;
        new->dev                = old->dev;
        new->transport_header   = old->transport_header;
        new->network_header     = old->network_header;
        new->mac_header         = old->mac_header;
        new->dst                = dst_clone(old->dst);
#ifdef CONFIG_XFRM
        new->sp                 = secpath_get(old->sp);
#endif
        memcpy(new->cb, old->cb, sizeof(old->cb));
        new->csum_start         = old->csum_start;
        new->csum_offset        = old->csum_offset;
        new->local_df           = old->local_df;
        new->pkt_type           = old->pkt_type;
        new->ip_summed          = old->ip_summed;
        skb_copy_queue_mapping(new, old);
        new->priority           = old->priority;

Where do you think there is a problem?

- Arnaldo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-02-20 12:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-20  8:45 PROBLEM: a trivial bug in __copy_skb_header() ? Chu XJ
2009-02-20 12:59 ` Arnaldo Carvalho de Melo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).