免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: ShadowStar

[网络管理] IPP2P模块修改版,最新0.99.16 [复制链接]

论坛徽章:
0
发表于 2007-11-22 19:19 |显示全部楼层
原帖由 snow888 于 2007-11-22 18:54 发表



那是不是说,我必须将 RHEL5 的源码也安装上去,才能编译安装这个软件包?


只要有内核和iptables的源代码就可以

论坛徽章:
0
发表于 2007-11-23 08:33 |显示全部楼层
楼主真是强啊!顶!希望楼主能继续更新下去。

论坛徽章:
0
发表于 2007-11-23 09:00 |显示全部楼层
gcc --version
gcc (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

linux-2.6.23.8
iptables-1.3.8

编译后,运行不了,出现段错误

论坛徽章:
0
发表于 2007-11-23 09:24 |显示全部楼层
原帖由 springwind426 于 2007-11-23 09:00 发表
gcc --version
gcc (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is N ...



1.3.8版的iptables不能直接make,1.3.5的可以

论坛徽章:
0
发表于 2007-11-23 09:24 |显示全部楼层
原帖由 springwind426 于 2007-11-23 09:00 发表
gcc --version
gcc (GCC) 4.2.3 20071014 (prerelease) (Debian 4.2.2-3)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is N ...


我这边没有使用gcc-4.2以上编译过
请把详细的信息贴出来,包括make的信息和错误的信息

论坛徽章:
0
发表于 2007-11-24 15:11 |显示全部楼层
iptables -A FORWARD -p tcp -m ipp2p --xunlei -j DROP
iptables: No chain/target/match by that name


晕,怎么iptables会报这样的呢?

论坛徽章:
0
发表于 2007-11-24 16:52 |显示全部楼层
原帖由 yanzai 于 2007-11-24 15:11 发表
iptables -A FORWARD -p tcp -m ipp2p --xunlei -j DROP
iptables: No chain/target/match by that name


晕,怎么iptables会报这样的呢?


请仔细察看一楼的编译说明

论坛徽章:
0
发表于 2007-11-24 17:58 |显示全部楼层
原帖由 yanzai 于 2007-11-24 15:11 发表
iptables -A FORWARD -p tcp -m ipp2p --xunlei -j DROP
iptables: No chain/target/match by that name


晕,怎么iptables会报这样的呢?



是不是没有编译内核?

论坛徽章:
0
发表于 2007-11-25 12:03 |显示全部楼层
原帖由 ShadowStar 于 2007-11-23 09:24 发表


我这边没有使用gcc-4.2以上编译过
请把详细的信息贴出来,包括make的信息和错误的信息



修改Makefile

KERNEL_SRC = ../linux-2.6.23.8
#KERNEL_SRC ?= $(firstword $(wildcard /lib/modules/$(shell uname -r)/build /usr/src/linux))
ifeq ($(KERNEL_SRC),)
$(error You need to define KERNEL_SRC)
endif

ifneq ($wildcard $(KERNEL_SRC)/include/linux/modversions.h),)
MODVERSIONS = -DMODVERSIONS
endif

_KVER = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^VERSION' | cut -d"=" -f2))
_KPL = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^PATCHLEVEL' | cut -d"=" -f2))
_KSUB = $(strip $(shell cat $(KERNEL_SRC)/Makefile | grep -e '^SUBLEVEL' | cut -d"=" -f2))
KERNEL_SERIES=$(_KVER).$(_KPL)

ifeq ($(KERNEL_SERIES), 2.6)
        TARGET=ipt_ipp2p.ko
else
        TARGET=ipt_ipp2p.o
endif

SED = sed
IPTABLES_BIN = iptables
#ifndef $(IPTABLES_SRC)
#IPTVER = \
#       $(shell $(IPTABLES_BIN) --version | $(SED) -e 's/^iptables v//')
#IPTABLES_SRC = $(wildcard /usr/src/iptables-$(IPTVER))
#IPTABLES_SRC = /var/tmp/portage/net-firewall/iptables-1.3.8-r1/work/iptables-1.3.8
#endif

IPTABLES_SRC = ../iptables-1.3.8-20071014
IPTVER = 1.3.8-20071014


还有,CFLAGS = -Wall  原来是  CFLAGS = -O3 -Wall

make
make -C ../linux-2.6.23.8 M=/usr/local/src/210.47.176.135/ipp2p-0.99.6 modules
make[1]: Entering directory `/usr/local/src/210.47.176.135/linux-2.6.23.8'
  CC [M]  /usr/local/src/210.47.176.135/ipp2p-0.99.6/ipt_ipp2p.o
/usr/local/src/210.47.176.135/ipp2p-0.99.6/ipt_ipp2p.c:960: warning: initialization from incompatible pointer type
/usr/local/src/210.47.176.135/ipp2p-0.99.6/ipt_ipp2p.c:963: warning: initialization from incompatible pointer type
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /usr/local/src/210.47.176.135/ipp2p-0.99.6/ipt_ipp2p.mod.o
  LD [M]  /usr/local/src/210.47.176.135/ipp2p-0.99.6/ipt_ipp2p.ko
make[1]: Leaving directory `/usr/local/src/210.47.176.135/linux-2.6.23.8'
gcc -Wall -DIPTABLES_VERSION=\"1.3.8-20071014\" -I../iptables-1.3.8-20071014/include -fPIC -c libipt_ipp2p.c
libipt_ipp2p.c:417: warning: initialization from incompatible pointer type
libipt_ipp2p.c:418: warning: initialization from incompatible pointer type
libipt_ipp2p.c:420: warning: initialization from incompatible pointer type
libipt_ipp2p.c:421: warning: initialization from incompatible pointer type
gcc -shared -o libipt_ipp2p.so libipt_ipp2p.o

然后,modprobe ipp2p是没有问题的

但是,用 iptables -m ipp2p --ipp2p 就提示 段错误

[ 本帖最后由 springwind426 于 2007-11-25 12:08 编辑 ]

论坛徽章:
0
发表于 2007-11-25 15:52 |显示全部楼层
原帖由 springwind426 于 2007-11-25 12:03 发表



修改Makefile

KERNEL_SRC = ../linux-2.6.23.8
#KERNEL_SRC ?= $(firstword $(wildcard /lib/modules/$(shell uname -r)/build /usr/src/linux))
ifeq ($(KERNEL_SRC),)
$(error You need to defin ...


我这边用gcc-4.1.2编译,没有发现
libipt_ipp2p.c:417: warning: initialization from incompatible pointer type
libipt_ipp2p.c:418: warning: initialization from incompatible pointer type
libipt_ipp2p.c:420: warning: initialization from incompatible pointer type
libipt_ipp2p.c:421: warning: initialization from incompatible pointer type
的信息。

我怀疑是由于gcc新版本对于调用的指针类型不兼用导致的。

但是我这边没有gcc-4.2的环境,没办法了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP