From: Mikhail Efremov <sem@altlinux.ru>
To: ALT Linux Sisyphus mailing list <sisyphus@lists.altlinux.org>
Subject: [sisyphus] Q: resolvconf and local resolver
Date: Tue, 23 Nov 2010 18:00:07 +0300
Message-ID: <20101123180007.4833ab31@sem.localdomain> (raw)
Hello!
Наш openresolv был запатчен так, чтобы принимать адреса 127.*.
Апстримовский вариант этого не позволял до недавнего времени.
При этом nameserver добавляется в позицию, задаваемую с помощью
приоритетов имен источников (обычно имя интерфейса) в resolvconf.conf,
точно так же как и в случае nameservers с любыми другими адресами.
Апстримить это я даже не пытался, в первую очередь потому, что мне не
нравится то, как я это реализовал. Была надежда, что я придумаю что-то
менее кривое, но не придумал.
В новой версии openresolv теперь позволяет принимать адреса 127.*, но
логика несколько другая: адреса 127.* всегда помещаются в начало
resolv.conf. Собственно, там это сделано в точности так, как я сам
сначала это реализовал, но потом решил, что могут быть разные
странные конфигурации и сохранять порядок добавления было бы
неплохо.
Апстримовский вариант проще и, в целом, выглядит менее криво, так что я
склоняюсь к мысли использовать все-таки именно его. Я не думаю, что
такое изменение поведения вызовет у кого-нибудь проблемы.
Т.е. текущее поведение нашего resolvconf:
echo 'nameserver 1.2.3.4' | resolvconf -a test1
cat /etc/resolv.conf
nameserver 1.2.3.4
echo 'nameserver 127.0.0.1' | resolvconf -a test2
cat /etc/resolv.conf
nameserver 1.2.3.4
nameserver 127.0.0.1
изменится на
echo 'nameserver 127.0.0.1' | resolvconf -a test2
cat /etc/resolv.conf
nameserver 127.0.0.1
nameserver 1.2.3.4
Кто-нибудь может привести use case, когда ради которого стоит сохранить
старое поведение и не помещать nameserver 127.0.0.1 всегда в начало
resolv.conf?
--
WBR, Mikhail Efremov
next reply other threads:[~2010-11-23 15:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-23 15:00 Mikhail Efremov [this message]
2010-11-23 15:07 ` Valery V. Inozemtsev
2010-11-23 15:28 ` Mikhail Efremov
2010-11-25 17:00 ` Mikhail Efremov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20101123180007.4833ab31@sem.localdomain \
--to=sem@altlinux.ru \
--cc=sisyphus@lists.altlinux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Sisyphus discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/sisyphus/0 sisyphus/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 sisyphus sisyphus/ http://lore.altlinux.org/sisyphus \
sisyphus@altlinux.ru sisyphus@altlinux.org sisyphus@lists.altlinux.org sisyphus@lists.altlinux.ru sisyphus@lists.altlinux.com sisyphus@linuxteam.iplabs.ru sisyphus@list.linux-os.ru
public-inbox-index sisyphus
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.sisyphus
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git