[OpenWrt-Devel] dnsmasq and --dhcp-relay option ?

openwrt-devel at couprie.net openwrt-devel at couprie.net
Fri Apr 24 09:26:50 EDT 2015


The diff is for /etc/init.d/dnsmasq

This diff works for me, it puts the following change in 
/var/etc/dnsmasq.conf

dhcp-relay=192.168.200.1,10.255.255.225

What do i need to change to submit it as a patch ?

Comments are welome :-)

Perry

On 24-04-15 13:21, Kevin Darbyshire-Bryant wrote:
> On 24/04/2015 11:17, Perry Couprie wrote:
>> And something like this ?
>>
>> --- dnsmasq.orig    2015-04-24 12:14:51.453093251 +0200
>> +++ dnsmasq    2015-04-24 12:15:15.121092827 +0200
>> @@ -416,6 +416,10 @@
>>      xappend 
>> "--dhcp-range=$networkid,$START,$END,$NETMASK,$leasetime${options:+ 
>> $options}"
>>
>>      dhcp_option_add "$cfg" "$networkid"
>> +
>> +    config_get relay "$cfg" relay
>> +    network_get_ipaddr interface_ip "$networkid"
>> +    xappend "--dhcp-relay=$interface_ip,$relay"
>>  }
>>
>>  dhcp_option_add() {
>>
>> Perry
>>
> That syntax won't work in /etc/dnsmasq.conf - it only understands 
> dnsmasq options, not .init/uci script options which would then be 
> passed to dnsmasq by /var/etc/dnsmasq.conf.  If you were talking about 
> extending uci so that it understood additional dnsmasq options then 
> I'm afraid you're beyond my level of knowledge. Stuff that uci doesn't 
> know about and is relatively static I've put into /etc/dnsmasq.conf 
> manually as /var/etc/dnsmasq.conf references /etc/dnsmasq.conf for 
> just such user customisation purposes.
>
> I hope that helps.
>
> Kevin
>
>
>
>> On 24-04-15 07:48, Kevin Darbyshire-Bryant wrote:
>>> Hi Perry,
>>>
>>> The /etc/dnsmasq.conf file is outside of uci control,  so it doesn't 
>>> get rebuilt at process start/stop and gets preserved across 
>>> reboots/upgrades.  It's an ideal place for tweaks and options that 
>>> the uci interface is not yet aware.  I use it all the time.  Edit 
>>> with your favourite text editor.
>>>
>>> Kevin
>>>
>>>
>>> -- 
>>> Cheers,
>>>
>>> Kevin at Darbyshire-Bryant.me.uk <mailto:Kevin at Darbyshire-Bryant.me.uk>
>>>
>>>
>>> On 24 Apr 2015, at 00:10, Perry Couprie <perry at couprie.net 
>>> <mailto:perry at couprie.net>> wrote:
>>>
>>>> Can this be done by using uci commands ?
>>>>
>>>> Perry
>>>>
>>>> On 23-04-15 23:20, Kevin Darbyshire-Bryant wrote:
>>>>> On 23/04/2015 21:55, openwrt-devel at couprie.net wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I need the dnsmasq --dhcp-relay option, how do i add this option 
>>>>>> to the dnsmasq script ?
>>>>>>
>>>>>> Perry
>>>>>
>>>>> You could edit '/etc/dnsmasq.conf' and add your option/s directly 
>>>>> to it.  Does that achieve your aim?
>>>>>
>>>>> Kevin
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> openwrt-devel mailing list
>>>>> openwrt-devel at lists.openwrt.org
>>>>> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
>>>>
>>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150424/593fc8f6/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list