LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1205|回复: 1

iptables加载layer7疑问!!!

[复制链接]
发表于 2010-3-18 13:46:16 | 显示全部楼层 |阅读模式
内核netfilter和iptables已经编译进入layer7
但执行
~ # iptables -t mangle -I POSTROUTING -m layer7 --l7proto qq -j DROP
Segmentation fault

有人知道这是什么原因导致的吗
 楼主| 发表于 2010-3-18 15:59:38 | 显示全部楼层

显示是下面的字符串拷贝出错,感觉是info没分配空间,但

strncpy(info->protocol, line, MAX_PROTOCOL_LEN);

但它是
static int parse(int c, char **argv, int invert, unsigned int *flags,
      const struct ipt_entry *entry, unsigned int *nfcache,
      struct ipt_entry_match **match)
{               
        struct ipt_layer7_info *layer7info =
                (struct ipt_layer7_info *)(*match)->data;

由iptables提供的空间啊?!!
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表