- if [ "$supports_vap" = 0 ] || [ "$vap" = 0 ] || [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ]; then
- # vaps are either not supported or enabled or they are supported and enabled
- # but we also want to use DHCP on the adhoc interface
+ if [ "$supports_vap" = 0 ] || \
+ [ "$vap" = 0 ] || \
+ [ "$supports_vap" = 1 -a "$vap" = 1 -a "$ahdhcp_when_vap" = 1 ] || \
+ [ "$lan_is_olsr" = "1" ]; then
+ # setup an alias interface for the main interface to use as a network for clients
+ # when one of the following conditions is met
+ # * vaps are not supported
+ # * or not enabled
+ # * or they are supported and enabled but we also want to use DHCP on the adhoc interface
+ # * or this is the lan interface and it is used for olsrd (and dhcp is enabled)