My laptop has ethernet adapter which is started by default (95% of time my Laptop connected to ethernet LAN). But sometimes I use ppp connections. So, all optimization related for my situation :) 1. My resolv.conf contains my DNS servers which is usable only from my home LAN via eth0. So when ppp connection is established new dns entry will be added after my home DNSes => all resolv operation will take many times, because my linux will try to use dns one by one from head of /etc/resolv.conf.... Solution: I suggest to add "#ppp" entry to /etc/resolv.conf. And modified ip-up will substitute "#ppp" with DNS entry for ppp conection. This changes will allow to point any position in /etc/resolv.conf (as you wish :)) for new dns entry. 2. /etc/net.ppp0 wants to remove default route, if seted PEERDNS="yes" from /etc/conf.d/net.ppp0. But /sbin/route | egrep "default" takes very much times, because eth0 network unplugged and route cant resolv names :/ Solution: use "/sbin/route -n" -- no resolving! Reproducible: Always Steps to Reproduce: 1. 2. 3.
Created attachment 61377 [details, diff] patch for suggested optimization
1) doesn't make sense. Either you want to use the peer's DNS entries or not - there is no point in mixing tons of DNS servers. 2) A valid point, but I'm not fixing it because we plan to remove the actual net.ppp0 script in favor of the upcoming ppp baselayout net module.
(In reply to comment #2) > 1) doesn't make sense. Either you want to use the peer's DNS entries or not - > there is no point in mixing tons of DNS servers. heh, not "tons". just one "bad" dns entry will take much more time 4 resolve > 2) A valid point, but I'm not fixing it because we plan to remove the actual > net.ppp0 script in favor of the upcoming ppp baselayout net module. ok, let's wait and see :)