View Issue Details

IDProjectCategoryView StatusLast Update
0018202CentOS-7dhcppublic2021-05-21 02:06
Reporterpuravidacentos Assigned To 
Status newResolutionopen 
PlatformAmazon Web ServiceOSCentOSOS Version7
Summary0018202: append domain-search "" dhclient.conf works as prepend

prepend domain-search "";

in /etc/dhcp/dhclient.conf but the domain ended prepended instead appended.
Steps To Reproduce[1] create /etc/dhcp/dhclient.conf
# more /etc/dhcp/dhclient.conf
interface "eth0" {
  prepend domain-search "";

[2] ps -eaf | grep dhclient
root 4366 1 0 19:13 ? 00:00:00 /sbin/dhclient -1 -q -lf /var/lib/dhclient/ -pf /var/run/ -H ip-172-31-3-61 eth0

[3] kill pid in step [2]
[4] rerun command in step [2]
[5] # cat /etc/resolv.conf
; generated by /usr/sbin/dhclient-script
search us-west-1.compute.internal
TagsNo tags attached.




2021-05-20 23:54

manager   ~0038450

I am not sure that I get it. Per your reproducer you explicitly specify _prepend_ in the config file and then complain that the domain gets _prepended_ ?


2021-05-21 01:05

reporter   ~0038451

_prepend domain-search ""_ in the step 1 in reproducer should be _append domain-search ""_.


2021-05-21 02:06

manager   ~0038452

I cannot reproduce your exact issue but there indeed seems to exist a problem with dhclient. On my system (which is a fully updated 7.9) if I use any of the prepend or append options, the search domain sent by the DHCP server is ignored and replaced by the values provided by prepend and append from dhclient's config file, postfixed with a dot ( "" for instance )
my test was performed by creating the adequate dhclient.conf file and then issuing
           ifdown enp2s0; rm /etc/resolv.conf; ifup enp2s0; cat /etc/resolv.conf
Unless someone chimes in with a correction or better idea, I suggest to file a bug at and hope for the best ( RHEL 7 is in maintenance mode so RH no longer provides anything but fixes they consider to be of high importance, mostly high-impact security fixes ). CentOS is built from the sources provided by RH so if they provide a fix, CentOS will inherit it automatically.

Issue History

Date Modified Username Field Change
2021-05-20 20:01 puravidacentos New Issue
2021-05-20 23:54 ManuelWolfshant Note Added: 0038450
2021-05-21 01:05 puravidacentos Note Added: 0038451
2021-05-21 02:06 ManuelWolfshant Note Added: 0038452