From d4f6aea68e7f4ec5dd2c72961360b28d143033b1 Mon Sep 17 00:00:00 2001 From: Darryl Quinn Date: Mon, 29 Jun 2015 20:07:01 -0500 Subject: [PATCH] bugfix: define tun hostname for olsrd --- files/usr/local/bin/olsrd-config | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/files/usr/local/bin/olsrd-config b/files/usr/local/bin/olsrd-config index 35e2a5ae..7c690692 100755 --- a/files/usr/local/bin/olsrd-config +++ b/files/usr/local/bin/olsrd-config @@ -101,7 +101,9 @@ foreach (@tunnelnames) $section=&uci_get_named_section("vtun",$_); if ($section->{enabled} eq 1) { + my $sip=$section->{serverip}; push(@tunnels,"tun${tunnum}"); + push @hosts, qq("$sip" "tun${tunnum}.$name.local.mesh"); $tunnum++; } } @@ -113,15 +115,13 @@ foreach (@tunnelnames) $section=&uci_get_named_section("vtun",$_); if ($section->{enabled} eq 1) { + my $cip=$section->{clientip}; push(@tunnels,"tun${tunnum}"); + push @hosts, qq("$cip" "tun${tunnum}.$name.local.mesh"); $tunnum++; } } - - - - # add the nameservice plugin push @file, qq(\nLoadPlugin "olsrd_nameservice.so.0.3"\n); push @file, qq({\n); @@ -145,6 +145,5 @@ push @file, qq(\n{\n); push @file, qq( Ip4Broadcast 255.255.255.255\n); push @file, qq(}\n); - # write the file print @file;