[WLANware] olsrd init patch für ipv6 und ipv4

Patrick patrick at lunatiki.de
Tue Jan 15 23:15:41 CET 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi

Das patch [AA] fügt sed regex ein um die verschiedenen config
parameter fuer ipv4 und ipv6 aus zu tauschen.


IPv6 Config:

wildcard
's/0.0.0.0/::/'

alles was nach ipv4 aussieht loeschen
'/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/d'

Neue metric fuer ipv6
's/etx_ff/etx_ffeth/'

NatThreshold entfernen. (Weis gerade nicht mehr warum)
'/NatThreshold/d'

Routing Tabellen brauch ich bei ipv4 wegen den ganzen nicht PI Netzen
im Freifunk. Bei ipv6 ist es eher eine unnötige Fehlerquelle.
'/RtTable/d'


IPv4 Config:

in nameservice PlParm kann auch eine ipv6 adresse stehen.
's/^\tPlParam \"[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:].*//'

Interface mode ether gibt es nur bei der etx_ffeth Metric und die
wollen wir nur bei ipv6
's/ether/mesh/'


Gruss
             Patrick
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.18 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlD11Q0ACgkQr9m0OkMZoqQMAgCdGlHDeSav+vjR/68IpwXFhreA
5jsAoNRrQFq2nm6sp0Ojlv16scInoIEr
=0l5U
-----END PGP SIGNATURE-----
-------------- n�chster Teil --------------
diff --git net/olsrd/files/olsrd.init net/olsrd/files/olsrd.init
index 7578316..b658423 100644
--- net/olsrd/files/olsrd.init
+++ net/olsrd/files/olsrd.init
@@ -662,8 +662,8 @@ start() {
 	if [ "$OLSRD_IPVERSION_6AND4" -ne 0 ]; then
 		bindv6only="$(sysctl -n net.ipv6.bindv6only)"
 		sysctl -w net.ipv6.bindv6only=1 > /dev/null
-		sed -e '/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/d' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv6
-		sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' -e 's/^\t\t[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:]*[ ][0-9]*$//' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4
+		sed -e 's/0.0.0.0/::/' -e '/[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}/d' -e 's/etx_ff/etx_ffeth/' -e '/NatThreshold/d' -e '/RtTable/d' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv6
+		sed -e 's/^IpVersion[ ][ ]*6$/IpVersion 4/' -e 's/^\tPlParam \"[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:].*//' -e 's/^\t\t[A-Fa-f0-9.:]*[:][A-Fa-f0-9.:]*[ ][0-9]*$//' -e 's/ether/mesh/' < "$OLSRD_CONFIG_FILE" > /var/etc/olsrd.conf.ipv4
 		rm $OLSRD_CONFIG_FILE
 
 		# some filenames should get the suffix .ipv6


More information about the WLANware mailing list