Am Montag, 8. Januar 2007 22:04 schrieb Thorsten Glaser: > Ralph Passgang dixit: > >The implementation of ipv6 is not so hard to understand (at least for the > >parts that might be important here): > > > >if ipv6 is available (as module or compiled in the kernel) then each time > > a interface gets configured, so that it has the status "up", it > > automaticly gets an ipv6 link-local address. Additional the ipv6 stack > > will scan on the interface for routers that are announcing networks. > > This is funny. BSD does rtsol only if enabled globally, and > the rtsol or rtsold programme is run on the interface.
linux does this another way, of course ;-) important to know is, that if ipv6-forwarding is enabled (not per default on freewrt systems) then autoconf & accept_ra (rtsol) is disabled by default. A link local address is configured in this mode, but no recieved annoucements are used for binding additional ips. But the problem is that even with forwarding enabled and autoconf disabled the interface gets an link local address. I think the eth0 devices should stay unconfigured and not have any ip binding at all. > >Later on eth0.0 is initialized. It binds THE SAME link local address, > > because eth0 and eth0.0 has the same mac adress (the same link local > > address for two devices can also be not correct in my opinion). > > Is eth0 used anyway, or only eth0.0? Can one set eth0 to down > without downing eth0.0 as well? eth0 is used, eth0.0 isn't at all... that's way I am saying that this could be a problem. At least if a network gets announced on one lan port (so normally this is eth0.0) is gets configured on eth0 and so I think every vlan (eth0.X) could address it and not only eth0.0. Even a route is configured automaticlly on eth0 for the link local network in the current ipv6 implementation of freewrt. > Looks like the implementation of interface aliases collides. Hmmm... I do not exactly know what you mean. But besides that, I think ipv6 addresses shouldn't be configured on eth0 at all. This interface doesn't need an ip address at all. To help beginners to start with freewrt it would also be very cool if eth0 could be hidden from "ip addr/link" output and only gets shown if someone ask directly for this device (via "ip addr eth0"). Maybe this is possible via compile time option like "Busybox - IP - hide not useable interfaces". But someone needs to implement that and this is totally diffrent thing :) [...] > >I thought it would be the best to handle this via the > > /etc/network/interfaces file > > Could you provide patches? Sure, I have attached two patches to address this problem 1) busybox-new-ipv6-functions.patch --> This patch includes the /etc/network/if-up.d/ipv6 functions for all freewrt devices. With this patch you can flush (disable) ipv6 on single interfaces or configure autoconf and stuff via the interfaces file. 2) ipv6-fix-for-WL500gP.patch --> This one adds the "ipv6-flush yes" part to /etc/network/interfaces. I only changed the interfaces file for the WL-500gP, because this is the only devices that I have at home to test. But I think this will be useable for all asus models and the other brcm-2.4 models. I have checked both patches and there are working... :) > >opt/svn/freewrt/staging_dir_mipsel/bin/mipsel-linux-uclibc-gcc -lc -o > >libz.so.1.2.3 adler32.o compress.o crc32.o gzio.o uncompr.o deflate.o > > trees.o zutil.o inflate.o infback.o inftrees.o inffast.o > > Obviously missing a -shared or -Bshared or whatever. The only difference between svn trunk revision 1490 and 1525 is "toolchain/gcc/3.4.4/910-mbsd-multi.patch" which is a new patch for gcc. All other changes in svn are only asterisk 1.4 related. With this new patch enabled the compiling of zlib fails on my build host. And because this patch was from you, maybe you have a clue :) Doesn't this affect other people besides me? Nobody has the same problem? Phil, you said something about trunk not compiling anymore? > bye, > //mirabile --Ralph
diff -Naur --exclude=.svn freewrt.svn/package/busybox/Makefile freewrt.changed/package/busybox/Makefile --- freewrt.svn/package/busybox/Makefile 2007-01-08 18:48:34.000000000 +0100 +++ freewrt.changed/package/busybox/Makefile 2007-01-08 23:55:17.000000000 +0100 @@ -46,6 +46,8 @@ $(INSTALL_BIN) ./files/bridge.pre-up \ $(IDIR_BUSYBOX)/etc/network/if-pre-up.d/bridge $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/network/if-up.d + $(INSTALL_BIN) ./files/ipv6.up \ + $(IDIR_BUSYBOX)/etc/network/if-up.d/ipv6 $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/network/if-down.d $(INSTALL_DIR) $(IDIR_BUSYBOX)/etc/network/if-post-down.d $(RSTRIP) $(IDIR_BUSYBOX) diff -Naur --exclude=.svn freewrt.svn/package/busybox/files/ipv6.up freewrt.changed/package/busybox/files/ipv6.up --- freewrt.svn/package/busybox/files/ipv6.up 1970-01-01 01:00:00.000000000 +0100 +++ freewrt.changed/package/busybox/files/ipv6.up 2007-01-09 00:00:34.000000000 +0100 @@ -0,0 +1,42 @@ +#!/bin/sh + +if [ "$IF_IPV6_FLUSH" == "1" ] || [ "$IF_IPV6_FLUSH" == "yes" ] +then + ip -6 addr flush $IFACE + logger -t IPv6 "deactivated IPv6 for interface $IFACE" +fi + +if [ "$IF_IPV6_AUTOCONF" == "1" ] || [ "$IF_IPV6_AUTOCONF" == "yes" ] +then + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/autoconf + logger -t IPv6 "autoconf enabled for $IFACE" +fi +if [ "$IF_IPV6_AUTOCONF" == "0" ] || [ "$IF_IPV6_AUTOCONF" == "no" ] +then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/autoconf + logger -t IPv6 "autoconf disabled for $IFACE" +fi + +if [ "$IF_IPV6_ACCEPT_RA" == "1" ] || [ "$IF_IPV6_ACCEPT_RA" == "yes" ] +then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra + logger -t IPv6 "accept-ra enabled for $IFACE" +fi +if [ "$IF_IPV6_ACCEPT_RA" == "0" ] || [ "$IF_IPV6_ACCEPT_RA" == "no" ] +then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_ra + logger -t IPv6 "accept-ra disabled for $IFACE" +fi + +if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "1" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "yes" ] +then + + echo 1 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects + logger -t IPv6 "accept-redirects enabled for $IFACE" +fi +if [ "$IF_IPV6_ACCEPT_REDIRECTS" == "0" ] || [ "$IF_IPV6_ACCEPT_REDIRECTS" == "no" ] +then + echo 0 > /proc/sys/net/ipv6/conf/$IFACE/accept_redirects + logger -t IPv6 "accept-redirects disabled for $IFACE" +fi
diff -Naur --exclude=.svn freewrt.svn/target/linux/brcm-2.4/asus-wl500g-premium/files/etc/network/interfaces freewrt.changed/target/linux/brcm-2.4/asus-wl500g-premium/files/etc/network/interfaces --- freewrt.svn/target/linux/brcm-2.4/asus-wl500g-premium/files/etc/network/interfaces 2007-01-08 18:48:23.000000000 +0100 +++ freewrt.changed/target/linux/brcm-2.4/asus-wl500g-premium/files/etc/network/interfaces 2007-01-08 23:53:18.000000000 +0100 @@ -35,3 +35,7 @@ # address 192.168.1.1 # netmask 255.255.255.0 +# internal port, do not change! +auto eth0 +iface eth0 inet manual + ipv6-flush yes
_______________________________________________ freewrt-developers mailing list [email protected] https://www.freewrt.org/lists/listinfo/freewrt-developers
