linux编译后文件运行死机,请问:2.6编译netfilter后运行死机

请问:2.6编译netfilter后运行死机

请问:2.6编译netfilter后运行死机

日期:2014-05-16  浏览次数:20339 次

请教:2.6编译netfilter后运行死机

请教下:运行到ip_nat_setup_info的时候就死机了,那位兄弟知道什么原因阿,谢谢

static   unsigned   int

trigger_dnat(struct   sk_buff   **pskb,

unsigned   int   hooknum,

const   struct   net_device   *in,

const   struct   net_device   *out,

const   void   *targinfo,

void   *userinfo)

{

struct   ipt_trigger   *found;

const   struct   iphdr   *iph   =   (*pskb)-> nh.iph;

struct   tcphdr   *tcph   =   (void   *)iph   +   iph-> ihl*4;/*   Might   be   TCP,   UDP   */

struct   ip_conntrack   *ct;

enum   ip_conntrack_info   ctinfo;

struct   ip_nat_multi_range   newrange;

int   ret;

IP_NF_ASSERT(hooknum   ==   NF_IP_PRE_ROUTING);

/*   Check   if   the   trigger-ed   range   has   already   existed   in   'trigger_list '.   */

found   =   LIST_FIND(&trigger_list,   trigger_in_matched,

struct   ipt_trigger   *,   iph-> protocol,   ntohs(tcph-> dest));

printk( "ntohs:%d\n ",ntohs(tcph-> dest));

if   (!found   ||   !found-> srcip)

{

printk( "no   match   in   the   list\n ");

return   IPT_CONTINUE;/*   We   don 't   block   any   packet.   */

}

printk( "#############   %s   ############\n ",   __FUNCTION__);

printk( "ip:%u\n ",found-> srcip);

found-> reply   =   1;/*   Confirm   there   has   been   a   reply   connection.   */

ct   =   ip_conntrack_get(*pskb,   &ctinfo);

IP_NF_ASSERT(ct   &&   (ctinfo   ==   IP_CT_NEW));

printk( "%s:   got   ",   __FUNCTION__);

DUMP_TUPLE(&ct-> tuplehash[IP_CT_DIR_ORIGINAL].tuple);

/*   Alter   the   destination   of   imcoming   packet.   */

printk( "Alter   the   destination   of   imcoming   packet\n ");

newrange   =   ((struct   ip_nat_multi_range)

{   1,   {   {   IP_NAT_RANGE_MAP_IPS,

found-> srcip,   found-> srcip,

{0}   ,   {0}

}   }   });

/*   Hand   modified   range   to   generic   setup.   */

printk( "Hand   modified   range   to   generic   setup ");

免责声明: 本文仅代表作者个人观点,与爱易网无关。其原创性以及文中陈述文字和内容未经本站证实,对本文以及其中全部或者部分内容、文字的真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。

微信扫码订阅
UP更新不错过~
关注
  • 0
    点赞
  • 0
    收藏 更改收藏夹
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、C币套餐、付费专栏及课程。

余额充值