Changeset 2213


Ignore:
Timestamp:
Nov 5, 2012, 3:22:36 PM (5 years ago)
Author:
matthijs
Message:

fonbase: Really fix pppoe mode when DNS is set to automatic.

In r2017, this same thing was supposed to be fixed, but the fix was
completely wrong. This fixes the broken condition and also explicitly
sets the peerdns value to 1 (which is the default) when using automatic
dns to make the code a bit more clear.

Due to a syntax error in the broken code, automatic DNS was still
working after r2017, but static DNS was not. When in r2129 this syntax
error was fixed, static DNS started working, but automatic DNS was
broken again.

References: #686
Closes: #1229

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/fon/fonbase/files/lib/fon/config.sh

    r2170 r2213  
    302302                        uci_set "network" "wan" "username" "$wanusername"
    303303                        uci_set "network" "wan" "password" "$wanpassword"
    304                         if [ "$wandns" = "0" -o -n "$wandns" ]; then
     304                        if [ -z "$wandns" -o "$wandns" = "0" ]; then
     305                                uci_set "network" "wan" "peerdns" "1"
     306                        else
    305307                                uci_set "network" "wan" "dns" "$wandns"
    306308                                uci_set "network" "wan" "peerdns" "0"
Note: See TracChangeset for help on using the changeset viewer.