Modify

Opened 5 years ago

Closed 4 years ago

#1229 closed bug (fixed)

DNS server not correctly set in PPPoE mode

Reported by: matthijs Owned by: matthijs
Priority: normal Milestone: Firmware 2.3.7.0
Component: fon-network Version: 2.3.7.0 rc1
Severity: minor
Cc: xsash@…, dbotoca@… Hardware: both

Description

On the blog, a user reports that his PPPoE connection is not working and the DNS server is shown as "0" on the dashboard.

Downgrading to beta2 helps.

http://blog.fonosfera.org/2370-release-candidate-released/#comment-206261

Attachments (1)

config.sh (18.5 KB) - added by matthijs 5 years ago.
Fix for this bug

Download all attachments as: .zip

Change History (6)

comment:1 Changed 5 years ago by matthijs

  • Cc dbotoca@… added
  • Hardware changed from unknown to both
  • Owner set to matthijs
  • Status changed from new to accepted

On the blog, xsash and dbotoca report that this was still working in beta3.

Changed 5 years ago by matthijs

Fix for this bug

comment:2 Changed 5 years ago by matthijs

  • Severity changed from unknown to minor
  • Status changed from accepted to testing-fix

Turns out there was some really broken code for the DNS handling, not sure what I was thinking when I wrote that...

In any case, I've attached a fix to this ticket. To apply it, simply run this command on your Fonera:

root@Fonera:~# wget -O /lib/fon/config.sh http://trac.fonosfera.org/fon-ng/raw-attachment/ticket/1229/config.sh

Please let me know if this works for you!

comment:3 Changed 5 years ago by dbotoca

Thank you for the config.sh correction, it works now on PPoE/DNS/Automatic.

I had to edit manually my /lib/fon/config.sh , couldn't figured out why I was getting bad address on trac.fonosfera.org on the wget - O ...... command. Definetely I was doing something wrong. :(

comment:4 Changed 5 years ago by matthijs

Ah, I suspect you experienced another bug (for which there is no ticket, but I already have a fix ready), where setting a static DNS server did not overwrite the previous DNS server, but appended the new setting to the list of DNS servers. This would lead to an invalid nameserver (due to this bug), followed by the valid (custom) DNS server you configured. Wget then failes to resolve any names. Dnsmasq, which takes care of DNS resolution for all PC's in your network, seems to simply ignore the invalid entry and instead uses the valid DNS server, which explains why your internet connection was otherwise working.

For anyone also suffering from this wget error: Rebooting your Fonera and then running the wget command is probably the easiest way to work around this.

comment:5 Changed 4 years ago by matthijs

  • Resolution set to fixed
  • Status changed from testing-fix to closed

(In [2213]) 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

Add Comment

Modify Ticket

Action
as closed The owner will remain matthijs.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.