<html><body bgcolor="#FFFFFF"><div>Just shake it a little ;):)<br><br>Sent from my iPhone</div><div><br>On Sep 29, 2011, at 3:26 PM, Teco Boot <<a href="mailto:teco@inf-net.nl">teco@inf-net.nl</a>> wrote:<br><br></div><div></div><blockquote type="cite"><div><div><div>Op 29 sep 2011, om 14:17 heeft Markus Kittenberger het volgende geschreven:</div><blockquote type="cite"><font class="Apple-style-span" color="#000000"><br></font><div class="gmail_quote">On Thu, Sep 29, 2011 at 2:00 PM, Teco Boot <span dir="ltr"><<a href="mailto:teco@inf-net.nl"><a href="mailto:teco@inf-net.nl">teco@inf-net.nl</a></a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div style="word-wrap:break-word"><div>Back to older kernel is no option for me, I need 3.0.0 for my gear.</div></div></blockquote><div>it was meant for testing, and finding the smart gateway problem ,..</div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; ">
<div style="word-wrap:break-word"><div><br></div><div>I see a /proc/sys/net/ipv4/conf/all/rp_filter with default value 1.</div></div></blockquote><div>might be a problem,.</div><div>what the value of </div><div>/proc/sys/net/ipv4/conf/tun0/rp_filter</div></div></blockquote><div><div>root@AHR-175-169:~# cat /proc/sys/net/ipv4/conf/tun0/rp_filter</div><div>1</div><div>But this is my OpenVPN tunnel !!</div><div><br></div><div>Here is what is of interest:</div><div><div>root@AHR-175-169:~# cat /proc/sys/net/ipv4/conf/tunl0/rp_filter </div><div>0</div><div><br></div></div></div><blockquote type="cite"><div class="gmail_quote"><div>and how does 3.0 kernel combine this values ? (-;</div></div></blockquote><div>I don't think it differs from older kernels.</div><div><br></div><div>I think the ../all/rp_filter enforce validation on all ifs.</div><div><br></div><div><br></div><div>In src/linux/net.c, <span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; ">is_at_least_linuxkernel_2_6_31</span>:</div><div><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "><a id="l173" href="http://olsr.org/git/?p=olsrd.git;a=blob;f=src/linux/net.c;h=8074401322a68bb4d19d44f947fd1fca4a2f90a6;hb=cd222f1dfa8dcb5f4c4265a42f49bcd0610cc07c#l173" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none; "> 173</a></span><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "> if (strncmp(uts.release, "2.6.",4) != 0) {</span></div><div><span class="Apple-style-span" style="font-family: monospace; font-size: small; "><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; "><a id="l174" href="http://olsr.org/git/?p=olsrd.git;a=blob;f=src/linux/net.c;h=8074401322a68bb4d19d44f947fd1fca4a2f90a6;hb=cd222f1dfa8dcb5f4c4265a42f49bcd0610cc07c#l174" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none; "> 174</a> return false;</div></span><span class="Apple-style-span" style="font-family: monospace; font-size: 12px; white-space: pre; "><a id="l175" href="http://olsr.org/git/?p=olsrd.git;a=blob;f=src/linux/net.c;h=8074401322a68bb4d19d44f947fd1fca4a2f90a6;hb=cd222f1dfa8dcb5f4c4265a42f49bcd0610cc07c#l175" class="linenr" style="color: rgb(153, 153, 153); text-decoration: none; "> 175</a> }</span></div><div><br></div><div>I put something in front:</div><div><br></div><div><div class="pre"><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="font-size: 12px; white-space: pre;"> if (strncmp(uts.release, "2", 1) >= 0) {
return true;
}
if (strncmp(uts.release, "2.6.", 4) != 0) {
return false;
}</span></font></div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; "><br></div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; ">I pushed into stable (with user name "right now"). Next time with correct name, I hope. </div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; "><br></div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; ">There are some unexpected netlink error messages in syslog:</div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; ">On gateway server:</div><div class="pre"><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="font-size: 12px; white-space: pre;">Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '1' (was 1) to /proc/sys/net/ipv4/ip_forward
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/tunl0/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/all/send_redirects
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 0) to /proc/sys/net/ipv4/conf/all/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/send_redirects
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/wlan0/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Adding interface wlan0
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/eth1.2580/send_redirects
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Writing '0' (was 1) to /proc/sys/net/ipv4/conf/eth1.2580/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17142]: Adding interface eth1.2580
Sep 29 19:00:11 AHR-175-173 olsrd[17144]: Writing "0" to /proc/sys/net/ipv4/conf/bmf0/rp_filter
Sep 29 19:00:11 AHR-175-173 olsrd[17144]: <a href="http://olsr.org"><a href="http://olsr.org">olsr.org</a></a> - pre-0.6.2-git_-hash_c88f1d019c2e53ce1cb8270a8b9ef9de - successfully started
Sep 29 19:01:31 AHR-175-173 olsrd[17144]: Received netlink error code File exists (-17)
Sep 29 19:23:59 AHR-175-173 olsrd[17144]: Received netlink error code File exists (-17)</span></font></div><div class="pre"><font class="Apple-style-span" face="monospace"><span class="Apple-style-span" style="font-size: 12px; white-space: pre;">Not sure it has to do with SmartGateway</span></font></div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; "><br></div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; ">Teco</div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; "><br></div><div class="pre" style="font-family: monospace; font-size: 12px; white-space: pre; "><br></div></div><blockquote type="cite"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap:break-word">
<div>We better turn this off.</div><div>It is automatically turned off if kernel >= 2.6.31.</div><div>Update code for >= 3.0.0 also?</div></div></blockquote><div>maybe we need another code, as 3.0 should be evaluate as bigger than 2.6.31 *G</div></div></blockquote><blockquote type="cite"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto; "><div style="word-wrap:break-word"><div><br></div><div>Now I have smart gateway running. Great!!</div></div></blockquote>
<div>fine!</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>I'll test a bit more.</div><div><br></div><div>
Teco</div><div><br></div><br><div><div>Op 25 sep 2011, om 17:00 heeft Markus Kittenberger het volgende geschreven:</div><div><div></div><div class="h5"><br><blockquote type="cite">try to use "older" kernel versions (or best an openwrt router with an old openwrt release, and without any firewall)) on the gateway side, <div>
<br></div><div>cause while on client side we defenitely broke smartgateway with using the onlink flag for routes, some months ago, but on server side, i really doubt that we anyhow managed to break it recently (and it worked on the systems we tested it #1</div>
<div><br><div>Markus</div><div><br></div><div>#1 but i can`t recall completely which ones this where, but it included for sure openwrt whiterussian and kamikaze<br><br><div class="gmail_quote">On Sun, Sep 25, 2011 at 1:52 PM, Teco Boot <span dir="ltr"><<a href="mailto:teco@inf-net.nl" target="_blank"><a href="mailto:teco@inf-net.nl">teco@inf-net.nl</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Thanks.<div><br></div><div>I didn't see the error messages anymore and route is added. Packets flow into tunnel, but receiving gateway node doesn't forward. I'll try to find out why.</div>
<div>I am couple of weeks offline, so keep patience.</div><div><br></div><div>Teco</div><div><br></div><div><br><div><div>Op 20 sep 2011, om 23:03 heeft Markus Kittenberger het volgende geschreven:</div><div><div></div><div>
<br><blockquote type="cite">i just pushed a patch to stable that should fix this bug,.. <div><div><br></div><div>Markus<br><br><div class="gmail_quote">On Fri, Aug 26, 2011 at 4:12 PM, Teco Boot <span dir="ltr"><<a href="mailto:teco@inf-net.nl" target="_blank"><a href="mailto:teco@inf-net.nl">teco@inf-net.nl</a></a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I have problems with SmartGateway. Add route to tunnel is rejected.<br>
<br>
I use dyn_gw also. But this node has no default route. So I think it is not dyn_gw.<br>
<br>
If selected GW is a 1-hop away destination, is traffic sent through tunnel?<br>
Or directly via if wan0? Looks smart. Or is this routing entry unexpected?<br>
<br>
<br>
Syslog:<br>
=======<br>
Aug 26 13:15:25 AHR-175-169 olsrd[2199]: Received netlink error code Invalid argument (-22)<br>
Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error: add route to <a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a> via 0.0.0.0 dev void onlink (Resource temporarily unavailable 11)<br>
Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error while setting inetgw tunnel route to <a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a> for if 19<br>
Aug 26 13:15:26 AHR-175-169 olsrd[2199]: Received netlink error code Invalid argument (-22)<br>
Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error: add route to <a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a> via 0.0.0.0 dev void onlink (Resource temporarily unavailable 11)<br>
Aug 26 13:15:26 AHR-175-169 olsrd[2199]: . error while setting inetgw tunnel route to <a href="http://0.0.0.0/0.0.0.0" target="_blank">0.0.0.0/0.0.0.0</a> for if 19<br>
Aug 26 13:15:26 AHR-175-169 olsrd[2199]: Received netlink error code File exists (-17)<br>
<br>
GW info:<br>
========<br>
Table: Gateways<br>
Status Gateway IP ETX Hopcnt Uplink Downlnk IPv4 IPv6 Prefix<br>
s- 172.31.175.166 1.000 1 120 1000 ipv4(n) - -<br>
u- 172.31.175.173 1.000 1 120 1000 ipv4(n) - -<br>
<br>
Tunnel:<br>
=======<br>
tnl_a6af1fac Link encap:IPIP Tunnel HWaddr<br>
inet addr:172.31.175.169 P-t-P:172.31.175.169 Mask:255.255.255.255<br>
UP POINTOPOINT RUNNING NOARP MTU:1480 Metric:1<br>
RX packets:0 errors:0 dropped:0 overruns:0 frame:0<br>
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0<br>
collisions:0 txqueuelen:0<br>
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)<br>
<br>
Default route:<br>
==============<br>
default via 172.31.175.166 dev wlan0 table 223 metric 4 onlink<br>
<br>
Config:<br>
=======<br>
SmartGateway yes<br>
LoadPlugin "olsrd_dyn_gw.so.0.5"<br>
{<br>
PlParam "HNA" "0.0.0.0 0.0.0.0"<br>
PlParam "HNA" "0.0.0.0 128.0.0.0"<br>
PlParam "HNA" "128.0.0.0 128.0.0.0"<br>
PlParam "HNA" "0.0.0.0 192.0.0.0"<br>
PlParam "HNA" "64.0.0.0 192.0.0.0"<br>
PlParam "HNA" "128.0.0.0 192.0.0.0"<br>
PlParam "HNA" "192.0.0.0 192.0.0.0"<br>
}<br>
<br>
<br>
Result when SmartGateway should use tunnel.<br>
I moved router #169 from #166 towards #173.<br>
Routing switched to #173, including traffic<br>
to Internet.<br>
===========================================<br>
Every 2.0s: olsr -l ; olsr -g ; echo ; ip route show table all | grep "default via" ; echo ; traceroute -n 8.8.8.8 Fri Aug 26 13:35:44 2011<br>
<br>
Table: Links<br>
Local IP Remote IP Hyst. LQ NLQ Cost<br>
172.31.175.169 172.31.175.166 0.00 1.000 0.607 1.645<br>
172.31.175.169 172.31.175.173 0.00 1.000 1.000 1.000<br>
<br>
Table: Gateways<br>
Status Gateway IP ETX Hopcnt Uplink Downlnk IPv4 IPv6 Prefix<br>
s- 172.31.175.166 1.645 1 120 1000 ipv4(n) - -<br>
u- 172.31.175.173 1.000 1 120 1000 ipv4(n) - -<br>
<br>
default via 172.31.175.173 dev wlan0 table 223 metric 4 onlink<br>
<br>
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets<br>
1 172.31.175.173 0.618 ms 0.492 ms 0.671 ms<br>
2 * * *<br>
3 213.51.132.193 26.720 ms 27.714 ms 44.023 ms<br>
4 213.51.157.42 45.014 ms 67.329 ms 68.274 ms<br>
5 213.51.158.146 69.222 ms 91.281 ms 92.216 ms<br>
6 72.14.219.220 117.372 ms 117.239 ms 118.354 ms<br>
7 209.85.254.95 119.239 ms <a href="tel:209.85.254.90" value="+12098525490" target="_blank">209.85.254.90</a> 96.420 ms 96.729 ms<br>
8 209.85.255.60 81.467 ms 81.439 ms 60.172 ms<br>
9 216.239.49.38 76.460 ms 75.945 ms 63.348 ms<br>
10 209.85.255.126 63.488 ms 43.024 ms 209.85.255.130 62.719 ms<br>
11 8.8.8.8 46.431 ms 59.123 ms 60.449 ms<br>
<br>
<br>
Teco<br>
<font color="#888888"><br>
<br>
<br>
--<br>
Olsr-dev mailing list<br>
<a href="mailto:Olsr-dev@lists.olsr.org" target="_blank"><a href="mailto:Olsr-dev@lists.olsr.org">Olsr-dev@lists.olsr.org</a></a><br>
<a href="https://lists.olsr.org/mailman/listinfo/olsr-dev" target="_blank"><a href="https://lists.olsr.org/mailman/listinfo/olsr-dev">https://lists.olsr.org/mailman/listinfo/olsr-dev</a></a><br>
</font></blockquote></div><br></div></div>
</blockquote></div></div></div><br></div></div></blockquote></div><br></div></div>
</blockquote></div></div></div><br></div></blockquote></div><br>
</blockquote></div><br></div></blockquote><blockquote type="cite"><div><span>-- </span><br><span>Olsr-dev mailing list</span><br><span><a href="mailto:Olsr-dev@lists.olsr.org">Olsr-dev@lists.olsr.org</a></span><br><span><a href="https://lists.olsr.org/mailman/listinfo/olsr-dev">https://lists.olsr.org/mailman/listinfo/olsr-dev</a></span></div></blockquote></body></html>