免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1393 | 回复: 0
打印 上一主题 下一主题

rhel as4 下iptables的模块升级 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-03-05 22:33 |只看该作者 |倒序浏览

在rhel as4 上,KERNEL版本是2.6.9-5.EL.
升级到iptables-1.3.0和patch-o-magic 20050302版
做法是按照
http://bbs.chinaunix.net/forum/4/050304/505370.html
来做的.其中有一点小问题.是关于little_endian.h的
1.先到
ftp.redhat.com
处下载kernel-2.6.9-5.EL.src.i386.rpm,因为没有在RHEL光盘上找到.
2.将上述RPM安装到/usr/src/redhat/SOURCE/下,将linux-2.6.9.tar.bz2解压缩
3.也要安装kernel-devel-2.6.9-5.EL这个包,因为需要几个文件.而且需要用这个包里的include头文件替换掉src.RPM包里的头文件.
莫名其妙是kernel-2.6.9-5.EL.src.i386这个包的头文件居然会有问题.
另外也要拷这几个文件是
cp /usr/src/kernels/2.6.9-5.EL-i686/scripts/genksyms/genksysms /usr/src/redhat/SOURCES/linux-2.6.9/scripts/genksyms
cp /usr/src/kernels/2.6.9-5.EL-i686/scripts/mod/modpost /usr/src/redhat/SOURCES/linux-2.6.9/scripts/mod
cp /usr/src/kernels/2.6.9-5.EL-i686/include/linux/types.h  /usr/src/redhat/SOURCES/linux-2.6.9/include/linux/
关键的关键:这个types.h要打一个小补丁.否则做到编译iptables时会报little_endian.h出很多错.
我是参照如下文件打补丁的:
--- linux-2.6.9-rc2/include/linux/types.h 2004-09-13 02:33:23.000000000 -0300
+++ linux/include/linux/types.h 2004-09-18 14:16:27.000000000 -0300
@@ -140,6 +140,13 @@
#define pgoff_t unsigned long
#endif
+#endif /* __KERNEL_STRICT_NAMES */
+
+/*
+ * Below are truly Linux-specific types that should never collide with
+ * any application/library that wants linux/types.h.
+ */
+
#ifdef __CHECKER__
#define __bitwise __attribute__((bitwise))
#else
@@ -153,13 +160,6 @@
typedef __u64 __bitwise __le64;
typedef __u64 __bitwise __be64;
-#endif /* __KERNEL_STRICT_NAMES */
-
-/*
- * Below are truly Linux-specific types that should never collide with
- * any application/library that wants linux/types.h.
- */
-
struct ustat {
__kernel_daddr_t f_tfree;
__kernel_ino_t f_tinode;
以上补丁来自
http://readlist.com/lists/vger.kernel.org/linux-kernel/9/46837.html


4. ln -s /usr/src/redhat/SOURCES/linux-2.6.9/include/asm-i386 /usr/src/redhat/SOURCES/linux-2.6.9/include/asm
做个链接,否则会找不到这个目录.
5.其余按照
http://bbs.chinaunix.net/forum/4/050304/505370.html
一步步做.
编译到ipt_connlimit时会报错.没找到解决办法.只好在Makefile中把这个选项关掉,编译才通过.
错误是:
net/ipv4/netfilter/ipt_connlimit.c: In function `count_them':
net/ipv4/netfilter/ipt_connlimit.c:100: error: structure has no member named `infos'
net/ipv4/netfilter/ipt_connlimit.c:107: error: structure has no member named `infos'
感谢一切给予我帮助的人,包括文中所参考的文章作者以及所有为LINUX奋斗的人.是他们无私的奉献赐于我们如此美丽的LINUX世界.


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/1247/showart_14241.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP