Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/bsd/openresolv/dist Import openresolv-3.5.1 to fix ...
details: https://anonhg.NetBSD.org/src/rev/0a82d68372e3
branches: trunk
changeset: 778462:0a82d68372e3
user: roy <roy%NetBSD.org@localhost>
date: Tue Mar 27 21:21:24 2012 +0000
description:
Import openresolv-3.5.1 to fix resolv_conf_local_only.
diffstat:
external/bsd/openresolv/dist/libc.in | 21 +++++++++++++++------
1 files changed, 15 insertions(+), 6 deletions(-)
diffs (31 lines):
diff -r 30e79540f30a -r 0a82d68372e3 external/bsd/openresolv/dist/libc.in
--- a/external/bsd/openresolv/dist/libc.in Tue Mar 27 19:24:01 2012 +0000
+++ b/external/bsd/openresolv/dist/libc.in Tue Mar 27 21:21:24 2012 +0000
@@ -132,12 +132,21 @@
*)
[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
newsearch="$(uniqify $search_domains $SEARCH $search_domains_append)"
- NS="$LOCALNAMESERVERS"
- case "${resolv_conf_local_only:-1}" in
- [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;;
- *) NS="$NS $NAMESERVERS";;
- esac
- newns="$(uniqify $name_servers $NS $name_servers_append)"
+ NS="$LOCALNAMESERVERS $NAMESERVERS"
+ newns=
+ gotlocal=false
+ for n in $(uniqify $name_servers $NS $name_servers_append); do
+ add=true
+ case "$n" in
+ 127.*|0.0.0.0|255.255.255.255|::1) gotlocal=true;;
+ *)
+ case "${resolv_conf_local_only:-YES}" in
+ [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
+ $gotlocal && add=false;;
+ esac
+ esac
+ $add && newns="$newns $n"
+ done
# Hold our new resolv.conf in a variable to save on temporary files
newconf="# Generated by resolvconf$NL"
Home |
Main Index |
Thread Index |
Old Index