Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 621836 - net-misc/dhcpcd-7.0.0 denyinterfaces ignored
Summary: net-misc/dhcpcd-7.0.0 denyinterfaces ignored
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: William Hubbs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-06-15 15:19 UTC by Daniel M. Weeks
Modified: 2017-06-17 08:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel M. Weeks 2017-06-15 15:19:39 UTC
denyinterfaces seems to be ignored by v7 on dhcpcd - for me it's popped up in both beta1 and rc1. The device in question is using netifrc and has only 1 interface (of 3) that runs dhcpcd. I'm unsure if this is Gentoo specific, if something changed in the new version that requires additional config changes, or it's an upstream problem.

Reproducible: Always

Steps to Reproduce:
1. Add "denyinterfaces ..." in dhcpcd.conf
2. Start dhcpcd (via net script, daemon, or direct)
Actual Results:  
Watch it apply for a lease and assign an address to the denied interface.

Expected Results:  
Leave the denied interface alone.
Comment 1 Roy Marples 2017-06-17 06:55:36 UTC
This surely isn't the case for me.
Can you post your /etc/dhcpcd.conf please?
And maybe `ps ax | grep dhcpcd` to check that a different dhcpcd.conf isn't being used.
Comment 2 Daniel M. Weeks 2017-06-17 07:03:49 UTC
Condensed dhcpcd.conf:

duid
persistent
option rapid_commit
option classless_static_routes
noipv4ll
denyinterfaces br0
allowinterfaces eth0
noipv6rs
interface eth0
	ipv6ra_own_default
	ipv6rs                 # enable routing solicitation
	iaid 1
        ia_pd 1/::/64	br0/0/64         # request a PD and assign it to br0
require dhcp_server_identifier
nohook lookup-hostname
nohook resolv.conf
waitip 4 6

There is no -f option supplied to dhcpcd.
Comment 3 Roy Marples 2017-06-17 07:15:55 UTC
I would write the config like this.
You want all global bits above the first interface (or profile/ssid) directive.

denyinterfaces br0
allowinterfaces eth0
duid
persistent
option rapid_commit
option classless_static_routes
require dhcp_server_identifier

noipv4ll
noipv6rs
waitip 4 6

nohook lookup-hostname
nohook resolv.conf

interface eth0
	ipv6ra_own_default
	ipv6rs                 # enable routing solicitation
	iaid 1
        ia_pd 1/::/64	br0/0/64         # request a PD and assign it to br0
Comment 4 Daniel M. Weeks 2017-06-17 07:27:45 UTC
I'll try this change. If the ordering of options is significant to the behavior then I think its very important for it to be documented in the man page. (I did not find it in my searches.)

I believe this happened when the dhcpcd was run as "dhcpcd -m 3 eth0" which I would expect to only operate on the specified interface per the man page. Is it possible a poor ordering in the config file can cause a problem even when explicitly specifying an interface?
Comment 5 Roy Marples 2017-06-17 08:05:11 UTC
This text is present in dhcpcd.conf(8)

interface interface
     Subsequent options are only parsed for this interface.

Won't fix your problem though, that's a real bug!
Patch here for review, please test:
https://dev.marples.name/D120
Comment 6 Roy Marples 2017-06-17 08:09:57 UTC
Also, ipv6ra_own_default is no longer a valid option (it's on all the time now, disable ipv6rs to stop it).
Don't set a default iaid of 1 AND 1 for the ia_pd. Just remove the iaid 1 line.
waitip should not have space between protocols (this may need to be documented better).