Ticket #1229 (closed bug: fixed)

Opened 8 months ago

Last modified 8 months ago

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

config.sh Download (18.5 KB) - added by matthijs 8 months ago.
Fix for this bug

Change History

Changed 8 months ago by matthijs

  • cc dbotoca@… added
  • hardware changed from unknown to both
  • status changed from new to accepted
  • owner set to matthijs

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

Changed 8 months ago by matthijs

Fix for this bug

Changed 8 months ago by matthijs

  • status changed from accepted to testing-fix
  • severity changed from unknown to minor

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!

Changed 8 months 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. :(

Changed 8 months 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.

Changed 8 months ago by matthijs

  • status changed from testing-fix to closed
  • resolution set to fixed

(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/Change #1229 (DNS server not correctly set in PPPoE mode)

Author


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


Action
as closed
 
Note: See TracTickets for help on using tickets.