[LEDE-DEV] [RFC PATCH odhcpd] config: respect ignore uci option

Karl Palsson karlp at tweak.net.au
Wed Jan 4 03:50:10 PST 2017


Jo-Philipp Wich <jo at mein.io> wrote:
> The odhcpd documentation currently implies that "option ignore
> 1" in a section of type "dhcp" will disable any services on the
> referenced interface while the code actually ignores the
> setting when initializing referenced interfaces.
> 
> This commonly leads to situations where users think that
> "option disabled" will prevent any server activity on a given
> interface while in reality odhcpd effectively acts as rogue
> DHCPv6 server in its default configuration.
> 
> To fully inhibit any activity, one has to specify both "option
> ignore 1" as well as "option ra disabled", "option ndp
> disabled" and "option dhcpv6 disabled" which is highly counter
> intuitive at best.
> 
> A previous commit (5f425ed Respect interface "ignore" settings
> as documented.) attempted to address the problem by observing
> the value of i->ignore instead of unconditionally enabling all
> protocols but broke the ability to use DHCPv6 relay mode while
> having DHCPv4 disabled.
> 
> This patch changes ...
> 
>  - the enabling of services on an interface to use the value of the ignore
>    option as default choice instead of hardcoding "true"
> 
>  - the options "ra", "ndp", "dhcpv4" and "dhcpv6" to take precedence over the
>    default "ignore" state to allow selectively enabling services on ignored
>    interfaces
> 
>  - the README to clarify the fact that "ra", "ndp", "dhcpv4" and "dhcpv6" can
>    now override "option ignore"
> 
> Signed-off-by: Jo-Philipp Wich <jo at mein.io>
> ---

Acked-by: Karl Palsson <karlp at etactica.com>

Not tested, but I support a future where "ignore" ignores :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP Digital Signature
URL: <http://lists.infradead.org/pipermail/lede-dev/attachments/20170104/1d19ec52/attachment.sig>


More information about the Lede-dev mailing list