dhcpcd produces incorrect /etc/resolv.conf
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Raspbian |
New
|
Undecided
|
Unassigned |
Bug Description
Package: dhcpcd5 1:8.1.2-1+rpt9 armhf
How to reproduce the bug:
Write the following static eth0 setting in /etc/dhcpcd.conf
interface eth0
static ip_address=
static routers=
static domain_
static domain_
dhcpcd updates /etc/resolv.conf as follows:
# Generated by resolvconf
domain home.arpa
which should be
# Generated by resolvconf
domain home.arpa
nameserver 192.168.99.53
Possible Workaround:
Specify domain_name before domain_
interface eth0
static ip_address=
static routers=
static domain_
static domain_
In my environment, this produces the desired resolve.conf
I may be wrong but I believe this bug is caused by incorrect identifier
comparison in src/script.c.
The following patch seems to fix the problem but is not tested extensively.
--- script.c-dist 2019-01-22 23:53:45.000000000 +0900
+++ script.c 2023-07-07 18:53:51.879120988 +0900
@@ -156,7 +156,8 @@
- config[i], e1) == 0)
+ config[i], e1) == 0 &&
+ ne[j][e1+
{
if (p == NULL) {