#!/bin/sh export DATE="11.5.2010";SCRIPT=${0#/rom} export TITLE="Admin: OLSR" . ${SCRIPT%/*}/cgi-bin-pre.sh cat<Admin: OLSR EOF if [ "$REQUEST_METHOD" = "POST" ]; then read QUERY_STRING fi if [ -z "$QUERY_STRING" ]; then #Speedups ff_smartgw="$(nvram get ff_smartgw)" ff_wldhcp_hna4="$(nvram get ff_wldhcp_hna4)" ff_qoslev="$(nvram get ff_qoslev)" ff_hyst="$(nvram get ff_hyst)" ff_policyrt="$(nvram get ff_policyrt)" ff_nameservice="$(nvram get ff_nameservice)" ff_arprefresh="$(nvram get ff_arprefresh)" ff_txtinfo="$(nvram get ff_txtinfo)" ff_bmf="$(nvram get ff_bmf)" ff_fisheye="$(nvram get ff_fisheye)" ff_olsrtc="$(nvram get ff_olsrtc)" cat<
OLSR Net:
Smart Gateway:Enable  Disable
OLSR Filter:
DMZ Redirect:
OLSR Services: EOF if [ -x /etc/init.d/S*dnsmasq ];then cat<
OLSR DHCP:
Use HNA4 for Clients:Enable  Disable
DHCP Services: All  Only web and email EOF fi cat<
 
HNA4:
IP4 Broadcast:
Interfaces:
OLSR Speed:
Willingness:
QOS Protocol (ETX):Enable  Disable
OLSR LQ-Multiplier:
Hysteresis: Enable  Disable
Hysteresis Scaling:
High Threshold:
Low Threshold:
Policy Routing:Enable  Disable
PING Addresses:
Nameservice:Enable  Disable
Arp Refresh: Enable  Disable
Txtinfo:Enable  Disable
Mcast Forward: Enable  Disable
OLSR Traffic Shaping: Enable  Disable
Fisheye Routing:Enable  Disable
 
   

Tip1: The IP Address and the Netmask settings on the Wireless page determines the ip address range used for OLSR. It is possible to configure an additional IP address out of the OLSR range on the LAN and/or WAN page. In this case the OLSR signaling is activated for the respective interface and the firewall configuration for the interface is deactivated. It is best to use a "narrower" netmask on the additional OLSR-IPs. This will ensure connectivity from suitable IP addresses if the OLSR daemon is not running. As a rarely used special case, it is possible to configure the same IP address on the LAN and on the Drahtlos page. The LAN and the Wireless interfaces will be linked with ethernet bridge then.

Tip2: Offering internet access for others made easy: connect the internet jack of the device to a standard internet router. The internet router will configure the internet interface via DHCP. The internet access will be announced by HNA4. Specific firewall rules exists for this service. To realize the internet access, the "dyn_gw_plugin" is activated in the OLSR daemon. The plugin will ensure the connectivity of the internet access with "traceroute" and will disable the HNA4 announcement accordingly.

EOF else IFS=\&;set ${QUERY_STRING%%[^%&=+-:@-_a-z~]*};unset IFS;eval $* DIRTY= if [ -n "$post_olsr" ]; then add= test -x /etc/init.d/S*dnsmasq && add="$add ff_wldhcp ff_wldhcp_hna4 ff_wldhcpfw" for V in $add ff_smartgw ff_range ff_ign ff_dmz ff_service ff_hna4 ff_ip4broad ff_iface ff_olsrspeed ff_will ff_qoslev ff_lqmult ff_hyst ff_scale ff_thrh ff_thrl ff_policyrt ff_ping ff_nameservice ff_arprefresh ff_txtinfo ff_bmf ff_fisheye ff_olsrtc; do eval "C=\$$V" C=$(httpd -d "$C") if [ "$C" != "$(nvram get $V)" ]; then DIRTY=1 nvram set $V="$C" fi done fi if [ -n "$DIRTY" ]; then nvram commit>/dev/null 2>&1 cat< The changed settings are committed. The settings are active after the next Restart. EOF else cat<No settings are changed. EOF fi fi . ${SCRIPT%/*}/cgi-bin-post.sh