Re: [mpls-linux-devel] Hi, the mpls command doesn't work after patch the kernel and install the ip
Status: Beta
Brought to you by:
jleu
From: Peng <jia...@gm...> - 2011-08-11 13:30:23
|
Hi, Igor, Thanks for you latest patch. When I patch the mpls patch, it seems ok, but when I patch the iproute/iptables/ebtables, there seems something wrong. root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# patch -p1 < /root/Desktop/mplspatchkernel2.6.38/mpls2.6.38.8.patch patching file include/linux/genetlink.h patching file include/linux/if_arp.h patching file include/linux/mpls.h patching file include/linux/netfilter/xt_MPLS.h patching file include/linux/ppp_defs.h patching file include/linux/rtnetlink.h patching file include/linux/shim.h patching file include/linux/socket.h patching file include/linux/sysctl.h patching file include/net/ip6_fib.h patching file include/net/ip_fib.h patching file include/net/mpls.h patching file include/net/shim.h patching file kernel/sysctl_binary.c patching file net/bridge/Kconfig patching file net/bridge/Makefile patching file net/bridge/mplsbr.c patching file net/bridge/netfilter/ebt_mpls.c patching file net/bridge/netfilter/Kconfig patching file net/bridge/netfilter/Makefile patching file net/core/dev.c patching file net/core/dst.c patching file net/core/Makefile patching file net/core/shim.c patching file net/ipv4/fib_frontend.c patching file net/ipv4/fib_semantics.c patching file net/ipv4/ip_input.c patching file net/ipv4/ip_output.c patching file net/ipv4/Kconfig patching file net/ipv4/Makefile patching file net/ipv4/mpls4.c patching file net/ipv4/route.c patching file net/ipv6/ip6_fib.c patching file net/ipv6/ip6_input.c patching file net/ipv6/ip6_output.c patching file net/ipv6/Kconfig patching file net/ipv6/Makefile patching file net/ipv6/mpls6.c patching file net/ipv6/route.c patching file net/Kconfig patching file net/Makefile patching file net/mpls/af_mpls.c patching file net/mpls/Makefile patching file net/mpls/mpls_dst.c patching file net/mpls/mpls_if.c patching file net/mpls/mpls_ilm.c patching file net/mpls/mpls_init.c patching file net/mpls/mpls_input.c patching file net/mpls/mpls_instr.c patching file net/mpls/mpls_netlink.c patching file net/mpls/mpls_nhlfe.c patching file net/mpls/mpls_opcode.c patching file net/mpls/mpls_output.c patching file net/mpls/mpls_procfs.c patching file net/mpls/mpls_proto.c patching file net/mpls/mpls_shim.c patching file net/mpls/mpls_sysctl.c patching file net/mpls/mpls_tunnel.c patching file net/mpls/mpls_utils.c patching file net/netfilter/Kconfig patching file net/netfilter/Makefile patching file net/netfilter/xt_DSCP.c patching file net/netfilter/xt_MPLS.c patching file net/sched/sch_dsmark.c root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# patch -p1 < /root/Desktop/mplspatchkernel2.6.38/iproute2-2.6.38mpls.patch The next patch would create the file include/bits/socket.h, which already exists! Assume -R? [n] y patching file include/bits/socket.h patching file include/linux/genetlink.h Hunk #1 FAILED at 80. 1 out of 1 hunk FAILED -- saving rejects to file include/linux/genetlink.h.rej patching file include/linux/if_addr.h Hunk #1 FAILED at 53. 1 out of 1 hunk FAILED -- saving rejects to file include/linux/if_addr.h.rej patching file include/linux/if_ether.h Hunk #1 FAILED at 122. 1 out of 1 hunk FAILED -- saving rejects to file include/linux/if_ether.h.rej patching file include/linux/if_link.h The next patch would create the file include/linux/mpls.h, which already exists! Assume -R? [n] y patching file include/linux/mpls.h Hunk #1 FAILED at 1. File include/linux/mpls.h is not empty after patch, as expected 1 out of 1 hunk FAILED -- saving rejects to file include/linux/mpls.h.rej patching file include/linux/rtnetlink.h Hunk #4 succeeded at 603 with fuzz 2. patching file include/linux/shim.h patching file include/linux/socket.h Hunk #1 FAILED at 16. 1 out of 1 hunk FAILED -- saving rejects to file include/linux/socket.h.rej patching file ip/iproute.c Hunk #1 FAILED at 24. Hunk #2 FAILED at 72. Hunk #3 FAILED at 112. Hunk #4 FAILED at 252. Hunk #5 FAILED at 384. Hunk #6 FAILED at 626. Hunk #7 FAILED at 657. Hunk #8 FAILED at 751. Hunk #9 FAILED at 1197. Hunk #10 FAILED at 1411. Hunk #11 FAILED at 1497. 11 out of 11 hunks FAILED -- saving rejects to file ip/iproute.c.rej patching file lib/ll_proto.c Hunk #1 FAILED at 93. 1 out of 1 hunk FAILED -- saving rejects to file lib/ll_proto.c.rej patching file Makefile Hunk #1 FAILED at 6. Hunk #2 FAILED at 35. 2 out of 2 hunks FAILED -- saving rejects to file Makefile.rej The next patch would create the file mpls/Makefile, which already exists! Assume -R? [n] y patching file mpls/Makefile The next patch would create the file mpls/mpls.c, which already exists! Assume -R? [n] y patching file mpls/mpls.c The next patch would create the file mpls/mpls.h, which already exists! Assume -R? [n] y patching file mpls/mpls.h The next patch would create the file mpls/mpls_monitor.c, which already exists! Assume -R? [n] y patching file mpls/mpls_monitor.c patching file tc/f_route.c Hunk #1 FAILED at 79. 1 out of 1 hunk FAILED -- saving rejects to file tc/f_route.c.rej patching file tc/m_xt.c Hunk #1 FAILED at 162. Hunk #2 FAILED at 307. 2 out of 2 hunks FAILED -- saving rejects to file tc/m_xt.c.rej root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# patch -p1 < /root/Desktop/mplspatchkernel2.6.38/iproute2-2.6.38mpls.patch tables1.4.12mpls.patch patching file extensions/libxt_MPLS.c The next patch would create the file include/linux/mpls.h, which already exists! Assume -R? [n] y patching file include/linux/mpls.h Hunk #1 FAILED at 1. File include/linux/mpls.h is not empty after patch, as expected 1 out of 1 hunk FAILED -- saving rejects to file include/linux/mpls.h.rej The next patch would create the file include/linux/netfilter/xt_MPLS.h, which already exists! Assume -R? [n] y patching file include/linux/netfilter/xt_MPLS.h patching file iptables/iptables.c Hunk #1 FAILED at 40. Hunk #2 FAILED at 1668. 2 out of 2 hunks FAILED -- saving rejects to file iptables/iptables.c.rej root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# patch -p1 < /root/Desktop/mplspatchkernel2.6.38/iptables1.4.12mpls.patch ebtables-v2.0.10-1mpls.patch patching file extensions/ebt_mpls.c patching file extensions/Makefile Hunk #1 FAILED at 1. 1 out of 1 hunk FAILED -- saving rejects to file extensions/Makefile.rej patching file include/linux/if_ether.h Hunk #1 succeeded at 138 with fuzz 1 (offset 3 lines). The next patch would create the file include/linux/mpls.h, which already exists! Assume -R? [n] y patching file include/linux/mpls.h Hunk #1 FAILED at 1. File include/linux/mpls.h is not empty after patch, as expected 1 out of 1 hunk FAILED -- saving rejects to file include/linux/mpls.h.rej patching file include/linux/netfilter/xt_MPLS.h root@peng-MacBookPro:~/Desktop/mplspatchkernel2.6.38/linux-2.6.38.8# patch -p1 < /root/Desktop/mplspatchkernel2.6.38/ebtables-v2.0.10-1mpls.patch ppp-2.4.5mpls.patch patching file include/linux/if_pppol2tp.h Reversed (or previously applied) patch detected! Assume -R? [n] y Hunk #1 succeeded at 35 (offset 3 lines). patching file pppd/main.c Hunk #1 FAILED at 96. Hunk #2 FAILED at 283. 2 out of 2 hunks FAILED -- saving rejects to file pppd/main.c.rej patching file pppd/Makefile.linux Hunk #1 FAILED at 13. 1 out of 1 hunk FAILED -- saving rejects to file pppd/Makefile.linux.rej patching file pppd/mplscp.c patching file pppd/mplscp.h And after patching, when I compile the kernel, eventually, it gives this error: CC [M] drivers/net/pppox.o In file included from drivers/net/pppox.c:29:0: include/linux/if_pppox.h:91:25: error: field pppol2tp has incomplete type make[2]: *** [drivers/net/pppox.o] Error 1 make[1]: *** [drivers/net] Error 2 make: *** [drivers] Error 2 and the vmlinuz is not created.... you have any idea about this? BR Peng 2011/8/10 Igor Maravić <ig...@et...> > Dear Peng, > problem is in include/linux/ip_fib.h. In struct fib_config, fc_shim should > be defined as pointer to struct rtshim. Because it is not defined as > pointer, in net/fib_frontend.c in function rtm_to_fib_config stack is > overflowing, when you issue the command > ip route add 192.168.1.0/24 via 10.0.0.3 mpls 0x2. > I wrote patches for Linux kernel 2.6.38.8, but I didn't test them thoroughly. > Maybe you could give them a try. Any feedback would be appreciated. > I have installed them on Ubuntu 11.04. > BR > Igor Maravić > > 2011/8/9 Peng <jia...@gm...> > >> Hi, >> >> I'm trying to using the mpls on my ubuntu box. I followed the instruction >> on >> >> >> http://ontwerpen1.khlim.be/~lrutten/cursussen/comm2/mpls-linux-docs/index.html >> >> but with the kernel version of 2.6.35 and >> linux-kernel-v2.6.35.13-mpls1.980.patch, >> >> iproute-2.6.27-2.fc10.mpls.1.963.i386.rpm<http://mpls-linux.sourceforge.net/fedora/10/i386/mpls/iproute-2.6.27-2.fc10.mpls.1.963.i386.rpm> >> >> ebtables-2.0.8-5.fc10.mpls.1.963.i386.rpm<http://mpls-linux.sourceforge.net/fedora/10/i386/mpls/ebtables-2.0.8-5.fc10.mpls.1.963.i386.rpm> >> >> iptables-1.4.1.1-2.fc10.mpls.1.963.i386.rpm<http://mpls-linux.sourceforge.net/fedora/10/i386/mpls/iptables-1.4.1.1-2.fc10.mpls.1.963.i386.rpm> >> >> after the patch the kernel, and installed the aliened iproute iptable and >> ebtable. >> >> when I used the .deb aliened from corresponding .rpm packages >> >> root@peng-MacBookPro:~# mpls hnhlfe add key 0 instaructions push gen 1000 >> nexthop eth0 ipv4 10.0.0.3 >> NHLFE entry key 0x00000002 mtu 0 propagate_ttl >> (0 bytes, 0 pkts) >> >> ip route add 192.168.1.0/24 via 10.0.0.3 mpls 0x2 >> >> it crashes my laptop right away, the whole screen froze and I cannot do >> anything >> >> The the kernel and patch method I'm using: >> >> Linux peng-MacBookPro 2.6.35.13 #1 SMP Thu Aug 4 23:41:12 EDT 2011 i686 >> GNU/Linux >> >> root@peng-MacBookPro:/usr/src/ >> linux-2.6.35.13# patch -p1 < >> /usr/src/linux-2.6.35.13/linux-kernel-v2.6.35.13-mpls1.980.patch >> >> and the methods I installed the iproute iptable and ebtable are: >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> dpkg -i iproute_2.6.27-3_i386.deb >> dpkg: warning: downgrading iproute from 20110728-1 to 2.6.27-3. >> (Reading database ... (Reading database ... 5% (Reading database ... 10% >> (Reading database ... 15% (Reading database ... 20% (Reading database ... >> 25% (Reading database ... 30% (Reading database ... 35% (Reading database >> ... 40% (Reading database ... 45% (Reading database ... 50% (Reading >> database ... 55% (Reading database ... 60% (Reading database ... 65% >> (Reading database ... 70% (Reading database ... 75% (Reading database ... >> 80% (Reading database ... 85% (Reading database ... 90% (Reading database >> ... 95% (Reading database ... 100% (Reading database ... 136388 files and >> directories currently installed.) >> Preparing to replace iproute 20110728-1 (using iproute_2.6.27-3_i386.deb) >> ... >> Unpacking replacement iproute ... >> Setting up iproute (2.6.27-3) ... >> Processing triggers for man-db ... >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> cd cp /bin/true /sbin/chkconifgfig >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> dpkg -i iptables_1.4.1.1-3_i386.deb >> dpkg: warning: downgrading iptables from 1.4.11.1-1 to 1.4.1.1-3. >> (Reading database ... (Reading database ... 5% (Reading database ... 10% >> (Reading database ... 15% (Reading database ... 20% (Reading database ... >> 25% (Reading database ... 30% (Reading database ... 35% (Reading database >> ... 40% (Reading database ... 45% (Reading database ... 50% (Reading >> database ... 55% (Reading database ... 60% (Reading database ... 65% >> (Reading database ... 70% (Reading database ... 75% (Reading database ... >> 80% (Reading database ... 85% (Reading database ... 90% (Reading database >> ... 95% (Reading database ... 100% (Reading database ... 136339 files and >> directories currently installed.) >> Preparing to replace iptables 1.4.11.1-1 (using >> iptables_1.4.1.1-3_i386.deb) ... >> Unpacking replacement iptables ... >> dpkg: warning: unable to delete old directory '/usr/local/lib': Directory >> not empty >> dpkg: warning: unable to delete old directory '/usr/local/share': >> Directory not empty >> dpkg: warning: unable to delete old directory '/usr/local': Directory not >> empty >> Setting up iptables (1.4.1.1-3) ... >> Processing triggers for man-db ... >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> >> root@peng-MacBookPro:~/Desktop/Linuxbackup/Desktop/debian/MPLSopensource# >> dpkg -i ebtables_2.0.8-6_i386.deb >> dpkg: warning: downgrading ebtables from 2.0.9.2-2 to 2.0.8-6. >> (Reading database ... (Reading database ... 5% (Reading database ... 10% >> (Reading database ... 15% (Reading database ... 20% (Reading database ... >> 25% (Reading database ... 30% (Reading database ... 35% (Reading database >> ... 40% (Reading database ... 45% (Reading database ... 50% (Reading >> database ... 55% (Reading database ... 60% (Reading database ... 65% >> (Reading database ... 70% (Reading database ... 75% (Reading database ... >> 80% (Reading database ... 85% (Reading database ... 90% (Reading database >> ... 95% (Reading database ... 100% (Reading database ... 136280 files and >> directories currently installed.) >> Preparing to replace ebtables 2.0.9.2-2 (using ebtables_2.0.8-6_i386.deb) >> ... >> Unpacking replacement ebtables ... >> Setting up ebtables (2.0.8-6) ... >> Processing triggers for man-db ... >> Processing triggers for ureadahead ... >> Processing triggers for libc-bin ... >> ldconfig deferred processing now taking place >> >> >> I'm wondering why I cannot use a simple function of this opensource >> project command, is there some command issue? >> maybe the command format introduced in the docs are outdated? >> or I didn't install the iproute/iptables package correctly? >> >> Has someone here successfully patched the kernel and installed the package >> on ubuntu? >> >> if ubuntu is not a good choice for this project's packages. >> >> What OS you guys usually use? >> >> Many thanks! >> >> BR >> Peng >> >> >> ------------------------------------------------------------------------------ >> uberSVN's rich system and user administration capabilities and model >> configuration take the hassle out of deploying and managing Subversion and >> the tools developers use with it. Learn more about uberSVN and get a free >> download at: http://p.sf.net/sfu/wandisco-dev2dev >> >> _______________________________________________ >> mpls-linux-devel mailing list >> mpl...@li... >> https://lists.sourceforge.net/lists/listinfo/mpls-linux-devel >> >> > |