maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   Manual DNS setting bug still need fixing (https://talk.maemo.org/showthread.php?t=93551)

Mara 2014-08-05 14:07

Manual DNS setting bug still need fixing
 
To overcome a DNS server bug in my workplace WLAN I need manually set DNS servers on N900 while leaving everything else DHCP. In WLAN configuration you have the option to set the DNS manually, but that is not working as descrbed in detail here:
https://bugs.maemo.org/show_bug.cgi?id=10816
It has been quite some time the bug has been opened... I guess no-one is actively working on fixing this for N900 (and likely for upcoming Neo900)?

Seems like the 50_ipv4_network_setup script needs some tweaking but I haven't got that far yet... If someone has already figured this out please let me know... :)

Halftux 2014-08-05 15:46

Re: Manual DNS setting bug still need fixing
 
Quote:

Originally Posted by Mara (Post 1434922)
To overcome a DNS server bug in my workplace WLAN I need manually set DNS servers on N900 while leaving everything else DHCP. In WLAN configuration you have the option to set the DNS manually, but that is not working as descrbed in detail here:
https://bugs.maemo.org/show_bug.cgi?id=10816
It has been quite some time the bug has been opened... I guess no-one is actively working on fixing this for N900 (and likely for upcoming Neo900)?

Seems like the 50_ipv4_network_setup script needs some tweaking but I haven't got that far yet... If someone has already figured this out please let me know... :)

So you mean your DHCP server is bugged and therefore you need to set manually a DNS server in N900 and this is also bugged?
And you are sure that your /etc/resolv.conf contains 127.0.0.1?

So you need to add manually for every client a DNS server? That is annoying.
Did you tried to remove the bug from the DHCP server?

I will look into it.
If this is true I will see what I can do :).

Mara 2014-08-05 16:36

Re: Manual DNS setting bug still need fixing
 
Quote:

Originally Posted by Halftux (Post 1434927)
So you mean your DHCP server is bugged and therefore you need to set manually a DNS server in N900 and this is also bugged?
And you are sure that your /etc/resolv.conf contains 127.0.0.1?

So you need to add manually for every client a DNS server? That is annoying.
Did you tried to remove the bug from the DHCP server?

I will look into it.
If this is true I will see what I can do :).

That's correct: The DNS server assigned by the network (via DHCP) is broken. Too bad also the DNS manual configuration in N900 is broken too, so that the manually set DNS server is ignored. (Please see the bug details.) If I set manually also the IP address and Gateway and Subnet Mask then the manual setting of DNS server works. If you try set DNS manually and leave the IP address from DHCP, the manually set DNS is ignored.

One workaround I have used is to manually edit the nameservers in var/run/resolv.conf.wlan0 file, but it gets overwritten every time the WiFi reconnects.

I'm not our network administrator so I can not fix the DNS. :(

sixwheeledbeast 2014-08-05 17:02

Re: Manual DNS setting bug still need fixing
 
ICD is a closed package, this bug is reported as an unconfirmed ICD bug. So if it's not fixed I am not sure how easy the fix will be. It has a Nokia int bug number assigned to it so they must have looked into it at some point.

Why not use a Static IP as a workaround for the time being? Find an IP that works and use that for your workplace connection.

Mara 2014-08-05 17:06

Re: Manual DNS setting bug still need fixing
 
Hmmm.. the bug reported says that he was able to fix it on his device:

"Tweaking 50_ipv4_network_setup so that it test for the absence of a
/var/run/resolv.conf.foo file before overriding it fixes the bug !"

Are you sure this is not fixable by modifying the above file? It is a shell script file.

EDIT: Yes, I'm currenty using static IP for time being.

Halftux 2014-08-05 17:58

Re: Manual DNS setting bug still need fixing
 
In file "/etc/maemo-dhcp.d/50_ipv4_network_setup" you need to look for

Code:

mv $RESOLV_CONF.tmp $RESOLV_CONF
and replace with

Code:

if [ ! -f $RESOLV_CONF ]
then
 mv $RESOLV_CONF.tmp $RESOLV_CONF
fi

Maybe you will get some problem if the phone will lost the power and the resolv.con.wlan0 get not deleted. I don't know if it get only delete when you close a connection or maybe also when starting a connection I don't know.

There could be a situation when you want to connect to a dhcp network that you need to manually delete the resolv.con.wlan0 before you get the dns entries.

Halftux 2014-08-05 18:19

Re: Manual DNS setting bug still need fixing
 
Maybe it is better to do it like this then the resolv.tmp get not created.

Code:

else
              echo -n > $RESOLV_CONF.tmp
              [ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF.tmp
              for i in $dns
              do
                echo nameserver $i >> $RESOLV_CONF.tmp
              done

              mv $RESOLV_CONF.tmp $RESOLV_CONF

              # Clear dnsmasq cache after getting new nameservers
              kill -SIGHUP `pidof dnsmasq`
              break
          fi


Code:

else
            if [ ! -f $RESOLV_CONF ]
            then

              echo -n > $RESOLV_CONF.tmp
              [ -n "$domain" ] && echo domain $domain >> $RESOLV_CONF.tmp
              for i in $dns
              do
                echo nameserver $i >> $RESOLV_CONF.tmp
              done

              mv $RESOLV_CONF.tmp $RESOLV_CONF
              fi

              # Clear dnsmasq cache after getting new nameservers
              kill -SIGHUP `pidof dnsmasq`
              break
          fi


Mara 2014-08-05 21:32

Re: Manual DNS setting bug still need fixing
 
Quote:

Originally Posted by Halftux (Post 1434956)
Maybe it is better to do it like this then the resolv.tmp get not created.

That did the trick... Thanks! :D

Halftux 2014-08-05 22:14

Re: Manual DNS setting bug still need fixing
 
Quote:

Originally Posted by Mara (Post 1434967)
That did the trick... Thanks! :D

You are welcome. I am sorry but there was a semicolon cause by fat finger. It doesn't hurt (no effect) but it should not be there. I have edited my post.

In line: if [ ! -f $RESOLV_CONF ];

Halftux 2014-08-06 07:15

Re: Manual DNS setting bug still need fixing
 
What you think?:

[1] Put the changed script to extras.
[2] Add this to CSSU.
[3] Or everybody who like can edit the file by themselves.


All times are GMT. The time now is 11:50.

vBulletin® Version 3.8.8