# [SOLVED] dhcpcd crashing: dhcp_envoption 213: Operation not supported

## bobby_tables

I noticed today in rc-status that dhcpcd has crashed after boot. For some reason I am still able to access the internet just fine, but no dhcpcd process is running. Restarting dhcpcd in openrc yields:

```
# rc-service dhcpcd restart

dhcpcd             | * Stopping DHCP Client Daemon ...

dhcpcd             | * start-stop-daemon: no matching processes found       [ ok ]

dhcpcd             | * Starting DHCP Client Daemon ...

dhcpcd             |main: control_open: Connection refused

dhcpcd             |wlp0s20f3: dhcp_envoption 213: Operation not supported

dhcpcd             |wlp0s20f3: dhcp_envoption 213: Operation not supported

dhcpcd             |malloc(): invalid size (unsorted)

dhcpcd             |malloc(): invalid size (unsorted)

dhcpcd             | * start-stop-daemon: failed to start `/sbin/dhcpcd'

dhcpcd             | * Failed to start DHCP Client Daemon                   [ !! ]

```

Manually running dhcpcd yields pretty much the same results:

```
# dhcpcd -d

dhcpcd-8.0.2 starting

udev: starting

dev: loaded udev

enp0s31f6: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT

enp0s31f6: executing `/lib/dhcpcd/dhcpcd-run-hooks' NOCARRIER

wlp0s20f3: executing `/lib/dhcpcd/dhcpcd-run-hooks' PREINIT

wlp0s20f3: executing `/lib/dhcpcd/dhcpcd-run-hooks' CARRIER

enp0s31f6: waiting for carrier

DUID 00:04:d4:60:5f:4c:2f:32:11:b2:a8:5c:95:82:23:29:7c:0c

wlp0s20f3: IAID 86:9f:f5:f1

wlp0s20f3: delaying IPv6 router solicitation for 0.7 seconds

wlp0s20f3: delaying IPv4 for 0.8 seconds

wlp0s20f3: soliciting an IPv6 router

wlp0s20f3: sending Router Solicitation

wlp0s20f3: reading lease `/var/lib/dhcpcd/wlp0s20f3-{ssid}.lease'

wlp0s20f3: rebinding lease of 192.168.101.12

wlp0s20f3: ARP announcing 192.168.101.12 (1 of 2), next in 2.0 seconds

wlp0s20f3: sending REQUEST (xid 0x10598415), next in 4.9 seconds

wlp0s20f3: acknowledged 192.168.101.12 from 192.168.101.1

wlp0s20f3: leased 192.168.101.12 for 86400 seconds

wlp0s20f3: renew in 43200 seconds, rebind in 75600 seconds

wlp0s20f3: writing lease `/var/lib/dhcpcd/wlp0s20f3-{ssid}.lease'

wlp0s20f3: adding IP address 192.168.101.12/24 broadcast 192.168.101.255

wlp0s20f3: adding route to 192.168.101.0/24

wlp0s20f3: adding default route via 192.168.101.1

wlp0s20f3: ARP announcing 192.168.101.12 (1 of 2), next in 2.0 seconds

wlp0s20f3: dhcp_envoption 213: Operation not supported

wlp0s20f3: dhcp_envoption 213: Operation not supported

wlp0s20f3: executing `/lib/dhcpcd/dhcpcd-run-hooks' REBOOT

forking to background

forked to background, child pid 25999

```

Despite the error message, dhcpcd successfully forks to the background. I am able to connect to the internet just as before. The machine seems to be getting a correct IP assigned:

```
$ ip addr

# ...

5: wlp0s20f3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

    link/ether 64:5d:86:9f:f5:f1 brd ff:ff:ff:ff:ff:ff

    inet 192.168.101.12/24 brd 192.168.101.255 scope global dynamic noprefixroute wlp0s20f3

       valid_lft 85952sec preferred_lft 75152sec

    inet6 fe80::91e2:2498:a33c:f359/64 scope link 

       valid_lft forever preferred_lft forever

```

I have a relatively simple network config:

```
# cat /etc/conf.d/net

dns_domain_lo="{localdomain}"

config_enp0s31f6="dhcp"

modules_wlp0s20f3="wpa_supplicant"

config_wlp0s20f3="dhcp"

```

... and only dhcpcd and wpa_supplicant are enabled in openrc (all /etc/init.d/net.* scripts are disabled).

I can't seem to find any results by searching "dhcp_envoption 213: Operation not supported". Since dhcpcd worked fine until very recently, I'm suspecting this might have something to do with my kernel config, and so I've attached it here. I'm at a loss as to what to do now.Last edited by bobby_tables on Sun Aug 18, 2019 3:08 am; edited 2 times in total

----------

## mike155

Hi bobby_tables,

welcome to the Gentoo forums!

I'm not very familiar with dhcpcd, but I suspect a problem in /etc/dhcpcd.conf. Do you set any environment values in /etc/dhcpcd.conf?

 *man dhcpcd wrote:*   

> env value: Push value to the environment for use in dhcpcd-run-hooks( 8 ).  For example, you can force the hostname hook to always set the hostname with -e force_hostname=YES.

 

Option 213 is OPTION_V4_ACCESS_DOMAIN (Access Network Domain Name)

Mike

----------

## bobby_tables

Hi Mike!

Thank you! I'm attaching my /etc/dhcpcd.conf below:

```
# A sample configuration for dhcpcd.

# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.

controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.

hostname

# Use the hardware address of the interface for the Client ID.

#clientid

# or

# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.

# Some non-RFC compliant DHCP servers do not reply with this set.

# In this case, comment out duid and enable clientid above.

duid

# Persist interface configuration when dhcpcd exits.

persistent

# Rapid commit support.

# Safe to enable by default because it requires the equivalent option set

# on the server to actually work.

option rapid_commit

# A list of options to request from the DHCP server.

option domain_name_servers, domain_name, domain_search, host_name

option classless_static_routes

# Respect the network MTU. This is applied to DHCP routes.

option interface_mtu

# Most distributions have NTP support.

#option ntp_servers

# A ServerID is required by RFC2131.

require dhcp_server_identifier

# Generate SLAAC address using the Hardware Address of the interface

#slaac hwaddr

# OR generate Stable Private IPv6 Addresses based from the DUID

slaac private

```

I believe I have only uncommented the line "controlgroup wheel", which shouldn't affect anything..

----------

## charles17

 *bobby_tables wrote:*   

> I noticed today in rc-status that dhcpcd has crashed after boot. For some reason I am still able to access the internet just fine, but no dhcpcd process is running. Restarting dhcpcd in openrc yields:
> 
> ```
> # rc-service dhcpcd restart...
> 
> ...

 

If you want to do this, you should not use any part of netifrc. Please see the Important notice in this wiki article. 

You might want to perform the missing migration steps.

----------

## bobby_tables

Hi charles17,

Following the wiki page I have removed netifrc:

```
# cat /etc/portage/package.use/sys-apps

sys-apps/openrc  -netifrc

# ls /etc/init.d/net

ls: cannot access '/etc/init.d/net': No such file or directory

# ls /etc/init.d/net.*

ls: cannot access '/etc/init.d/net.*': No such file or directory

```

However, the problem persists, and dhcpcd outputs the same error as above.

----------

## mike155

Your/etc/dhcpcd.conf looks good  :Smile: 

Dhcpcd 8.0.2 is pretty new. Could it be a bug? What happens if you go back to dhcpcd 7.2.3 (stable)?

----------

## bobby_tables

 *mike155 wrote:*   

> What happens if you go back to dhcpcd 7.2.3 (stable)?

 

That's it! I downgraded dhcpcd to 7.2.3 and no longer have an error. I noticed that "dhcp_envoption 213: Operation not supported" is still among the outputs, but it should be a non-critical error.

I'll look into filing a bug tomorrow, and will add a link here once I do so.

Thanks again!

----------

## UberLord

This should be fixed in dhcpcd-8.0.2-r1?

Can you test it?

I'm planning on releasing dhcpcd-8.0.3 over the next few days and would love to know if it's now fixed or needs another look at!

----------

## UberLord

Actually, it might need this patch as well:

https://roy.marples.name/cgit/dhcpcd.git/commit/?id=469ba0eff1cf0fd65edfd3e7679273662b9673a2

Or try the dhcpcd-9999 ebuild.

----------

## bobby_tables

 *UberLord wrote:*   

> Actually, it might need this patch as well:
> 
> https://roy.marples.name/cgit/dhcpcd.git/commit/?id=469ba0eff1cf0fd65edfd3e7679273662b9673a2
> 
> Or try the dhcpcd-9999 ebuild.

 

Thank you for your work! I'm tracking the master branch currently (a09f60c2) and everything is working fine now.

Thanks again, looking forward to 8.0.3!

----------

## UberLord

dhcpcd-8.0.3 is now in portage  :Smile: 

----------

