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,

ke...@darbyshire-bryant.me.uk <mailto:ke...@darbyshire-bryant.me.uk>


On 24 Apr 2015, at 00:10, Perry Couprie <pe...@couprie.net <mailto:pe...@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-de...@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@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel




_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to