Re: how to replace a skb in NF_IP_LOCAL_OUT hook

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This question belongs on the developer list I think.

On Wed, 2 Nov 2005, jywang wrote:

i want to replace the skb with my own, and in my skb i will change the data
in it.

How to do it?

what i do as below:

cp = skb_copy_expand(*skb, skb_headroom(*skb)+12, skb_tailroom(*skb), GFP_ATOMIC);
//change the skb->data here
skb_set_owner_w(cp, (*skb)->sk);
*skb = cp;
return NF_ACCEPT;

but, it can't work.




=====================================================
姓名:      王金一
电话:      (+86)10-58812325
单位:      中国科学院计算机网络信息中心 R&D
地址:      北京中关村南四街四号
邮编:      100080
email:     jywang@xxxxxxx
-----------------------------------------------------
Name:       jinyi wang
Phone:      (86-10) 5881-2325
Division:   R&D,Computer Network Information Center,
            Chinese Academy of Sciences
Address:    4,4th South Street, Zhongguancun,
            Haidian District, Beijing, China
Zip code:   100080
Email:      jywang@xxxxxxx
=====================================================




[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux