Active Topics

 


Reply
Thread Tools
Mara's Avatar
Posts: 1,310 | Thanked: 820 times | Joined on Mar 2006 @ Irving, TX
#1
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's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#2
Originally Posted by Mara View Post
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 .
 

The Following User Says Thank You to Halftux For This Useful Post:
Mara's Avatar
Posts: 1,310 | Thanked: 820 times | Joined on Mar 2006 @ Irving, TX
#3
Originally Posted by Halftux View Post
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.
 
Posts: 2,290 | Thanked: 4,134 times | Joined on Apr 2010 @ UK
#4
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.
__________________

Wiki Admin
sixwheeledbeast's wiki
Testing Squad Subscriber
- mcallerx - tenminutecore - FlopSwap - Qnotted - zzztop - Bander - Fight2048 -


Before posting or starting a thread please try this.
 

The Following User Says Thank You to sixwheeledbeast For This Useful Post:
Mara's Avatar
Posts: 1,310 | Thanked: 820 times | Joined on Mar 2006 @ Irving, TX
#5
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.

Last edited by Mara; 2014-08-05 at 17:09.
 
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#6
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.

Last edited by Halftux; 2014-08-05 at 18:01. Reason: typo
 
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#7
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

Last edited by Halftux; 2014-08-05 at 22:02. Reason: removed semicolon
 

The Following 6 Users Say Thank You to Halftux For This Useful Post:
Mara's Avatar
Posts: 1,310 | Thanked: 820 times | Joined on Mar 2006 @ Irving, TX
#8
Originally Posted by Halftux View Post
Maybe it is better to do it like this then the resolv.tmp get not created.
That did the trick... Thanks!
 
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#9
Originally Posted by Mara View Post
That did the trick... Thanks!
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 ];
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
Halftux's Avatar
Posts: 868 | Thanked: 2,516 times | Joined on Feb 2012 @ Germany
#10
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.
 

The Following 2 Users Say Thank You to Halftux For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 02:01.