[Dnsmasq-discuss] How to return a DHCP Option value which repeats DHCP Client MAC address ?

Geert Stappers stappers at stappers.nl
Wed Aug 19 21:47:17 BST 2020


On Wed, Aug 19, 2020 at 12:22:37PM +0200, Olivier wrote:
> Hello,
> 
> For some class of devices, I would like to return a DHCP Option value which
> repeats requester's MAC address (with case sensitivity control options).
> 
> dhcp-vendorclass=foo,"Foo"
> dhcp-option=vendor:foo,43,"http://1.2.3.4/foo_<MAC_in_uper_case>.cfg"
> 
> dhcp-vendorclass=bar,"Bar"
> dhcp-option=vendor:foo,43,"http://5.6.7.8/bar_<MAC_in_lower_case>.cfg"
> 
> For instance, if device of Foo class has 0123456789ab MAC, I would like to
> get an option 43 set with "http://1.2.3.4/foo_0123456789AB.cfg".
> If this device if of Bar class, I would like it to get "http://5.6.7.8/bar_0123456789ab.cfg".
> 
> Please, note that:
> - the MAC address must not include any separator,
> - as such, striping leading 0 must be avoided (returning bar_123456789ab instead of bar_0123456789ab).
> 
} What it possible with dnsmasq 2.80 ?

AIUI is the question if there is something that does expanding '${MAC_ADDRESS}'


Groeten
Geert Stappers
-- 
Silence is hard to parse



More information about the Dnsmasq-discuss mailing list