Re: [mpls-linux-devel] iptables Couldn't load target `mpls'
Status: Beta
Brought to you by:
jleu
From: Julien B. <jul...@gm...> - 2007-03-18 15:17:07
|
Hi James, I think I figure out what was wrong with the iptables MPLS module. Here is the change I made in net/ipv4/netfilter/ipt_mpls.c ">" = BEFORE "<" = AFTER %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 84,85c84,85 < // if (ipt_register_target(&ipt_mpls_reg)) < // return -EINVAL; --- > if (ipt_register_target(&ipt_mpls_reg)) > return -EINVAL; 87c87 < return ipt_register_target(&ipt_mpls_reg); --- > return 0; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% I also notice that the last version of iptables doesn't contain the new patch in order to be compatible to the newest version of the kernel (2.6.19.3). So here is the change that need to be made : %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% Index: include/iptables_common.h =================================================================== --- include/iptables_common.h (Revision 6660) +++ include/iptables_common.h (Arbeitskopie) @@ -42,4 +42,9 @@ extern void init_extensions(void); #endif +#define __be32 u_int32_t +#define __le32 u_int32_t +#define __be16 u_int16_t +#define __le16 u_int16_t + #endif /*_IPTABLES_COMMON_H*/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% And the last problem I had with iptables-mpls is with the file iptables-mpls/extensions/libip6t_mpls.c: Replace this line : void _init(void) with this one : void __attribute((constructor)) my_init(void) then you will have : void __attribute((constructor)) my_init(void) { register_target6(&mpls); } This fix the compiling problem I had. I hope this can help you. Please tell me if something goes wrong with my changes. So far, everything seems to work!! Regards, Julien On 3/16/07, James R. Leu <jl...@mi...> wrote: > > I think the ipt_mpls module is broken. I'm working on a fix. > When I figure it out. I'll post a new kernel. > > On Wed, Mar 14, 2007 at 01:50:27PM +0100, Julien Bisconti wrote: > > Hi James, > > > > > > You updated the repository according to my previous email. Now iptables > > compiles like a charm :-) > > But I still have the problem of the usability. > > > > Simple example: > > > > LSR1:~# iptables -A OUTPUT -d 128.104.17.130/32 -j mpls --nhlfe 0x2 > > iptables v1.3.5: Couldn't load target `mpls' > > > > Try `iptables -h' or 'iptables --help' for more information. > > LSR1:~# lsmod > > Module Size Used by > > ipt_mpls 2816 0 > > ip6t_mpls 2688 0 > > x_tables 15876 2 ipt_mpls,ip6t_mpls > > mpls_tunnel 9092 0 > > ebt_mpls 3328 0 > > ebtables 20096 1 ebt_mpls > > mplsbr 3840 0 > > mpls6 4224 0 > > ipv6 260768 11 mpls6 > > mpls4 6528 0 > > mpls 83244 7 > > ipt_mpls,ip6t_mpls,mpls_tunnel,ebt_mpls,mplsbr,mpls6,mpls4 > > > > > > Could you help make this work? Because the module is loaded and iptables > > doesn't seem to find it. > > > > Thank you for your help. > > > > > > Julien > > > > > > -- > > -------------------------------------------- > > Julien BISCONTI <julien.bisconti(at)student.fundp.ac.be> > > M.Sc. student in Computer Science, University of Namur > > FUNDP, Belgium > > > > ------------------------------------------------------------------------- > > Take Surveys. Earn Cash. Influence the Future of IT > > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > > opinions on IT & business topics through brief surveys-and earn cash > > > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > > _______________________________________________ > > mpls-linux-devel mailing list > > mpl...@li... > > https://lists.sourceforge.net/lists/listinfo/mpls-linux-devel > > > -- > James R. Leu > jl...@mi... > > -- -------------------------------------------- Julien BISCONTI <julien.bisconti(at)student.fundp.ac.be> M.Sc. student in Computer Science, University of Namur FUNDP, Belgium |