diff --git a/package/busybox/udhcpc.script b/package/busybox/udhcpc.script index 50c52e6fe3..ad110d3a7f 100755 --- a/package/busybox/udhcpc.script +++ b/package/busybox/udhcpc.script @@ -56,7 +56,16 @@ case "$1" in cat $TMPFILE > $RESOLV_CONF rm -f $TMPFILE - [ -n "$domain" ] && echo "search $domain # $interface" >> $RESOLV_CONF + # prefer rfc3359 domain search list (option 119) if available + if [ -n "$search" ]; then + search_list=$search + elif [ -n "$domain" ]; then + search_list=$domain + fi + + [ -n "$search_list" ] && + echo "search $search_list # $interface" >> $RESOLV_CONF + for i in $dns ; do echo adding dns $i echo "nameserver $i # $interface" >> $RESOLV_CONF