<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 11:38 AM, Dan Bugnar <span dir="ltr"><<a href="mailto:danutbug@gmail.com" target="_blank">danutbug@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><span style="font-size:12.8px">Should I remove this part? Maybe comment it (to have a sample) or replace with something else.</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Dan Bugnar</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 11:20 AM, Dan Bugnar <span dir="ltr"><<a href="mailto:danutbug@gmail.com" target="_blank">danutbug@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Should I remove this part? Maybe comment it (to have a sample) or replace with something else.<div><br></div><div>Dan Bugnar</div></div><div><div class="h5"><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jan 19, 2016 at 11:11 AM, John Crispin <span dir="ltr"><<a href="mailto:john@phrozen.org" target="_blank">john@phrozen.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span><br>
<br>
On 08/01/2016 16:24, dbugnar wrote:<br>
> Signed-off-by: dbugnar <<a href="mailto:dnbugnar@ocedo.com" target="_blank">dnbugnar@ocedo.com</a>><br>
> ---<br>
>  package/network/services/dnsmasq/files/dhcp.conf    |  6 ++++++<br>
>  package/network/services/dnsmasq/files/dnsmasq.init | 19 +++++++++++++++++++<br>
>  2 files changed, 25 insertions(+)<br>
><br>
> diff --git a/package/network/services/dnsmasq/files/dhcp.conf b/package/network/services/dnsmasq/files/dhcp.conf<br>
> index 362b90a..7a66b44 100644<br>
> --- a/package/network/services/dnsmasq/files/dhcp.conf<br>
> +++ b/package/network/services/dnsmasq/files/dhcp.conf<br>
> @@ -30,3 +30,9 @@ config dhcp lan<br>
>  config dhcp wan<br>
>       option interface        wan<br>
>       option ignore   1<br>
> +<br>
> +config relay<br>
> +     option local_addr       '192.168.1.1'<br>
> +     option server_addr      '0.0.0.0'<br>
> +     option interface        'eth0'<br>
<br>
<br>
</span>NAK on this part. you cannot add a static config for eth0/<a href="http://192.168.1.1" rel="noreferrer" target="_blank">192.168.1.1</a> as<br>
that is specific to your board and not generic.<br>
<span><font color="#888888"><br>
        JOhn<br>
</font></span><div><div><br>
> +<br>
> diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init<br>
> index 3ef2b3d..ac45d1b 100644<br>
> --- a/package/network/services/dnsmasq/files/dnsmasq.init<br>
> +++ b/package/network/services/dnsmasq/files/dnsmasq.init<br>
> @@ -538,6 +538,24 @@ dhcp_hostrecord_add() {<br>
>       xappend "--host-record=$record"<br>
>  }<br>
><br>
> +dhcp_relay_add() {<br>
> +     local cfg="$1"<br>
> +     local local_addr server_addr interface<br>
> +<br>
> +     config_get local_addr "$cfg" local_addr<br>
> +     [ -n "$local_addr" ] || return 0<br>
> +<br>
> +     config_get server_addr "$cfg" server_addr<br>
> +     [ -n "$server_addr" ] || return 0<br>
> +<br>
> +     config_get interface "$cfg" interface<br>
> +     if [ -z "$interface" ]; then<br>
> +             xappend "--dhcp-relay=$local_addr,$server_addr"<br>
> +     else<br>
> +             xappend "--dhcp-relay=$local_addr,$server_addr,$interface"<br>
> +     fi<br>
> +}<br>
> +<br>
>  service_triggers()<br>
>  {<br>
>       procd_add_reload_trigger "dhcp"<br>
> @@ -597,6 +615,7 @@ start_service() {<br>
>       config_foreach dhcp_subscrid_add subscrid<br>
>       config_foreach dhcp_domain_add domain<br>
>       config_foreach dhcp_hostrecord_add hostrecord<br>
> +     config_foreach dhcp_relay_add relay<br>
><br>
>       # add own hostname<br>
>       local lanaddr<br>
><br>
</div></div></blockquote></div><br></div>
</div></div></div></div></blockquote></div><br></div>
<br>_______________________________________________<br>
openwrt-devel mailing list<br>
<a href="mailto:openwrt-devel@lists.openwrt.org">openwrt-devel@lists.openwrt.org</a><br>
<a href="https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel" rel="noreferrer" target="_blank">https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel</a><br>
<br></blockquote></div></div><br><div class="gmail_extra">Is there a follow-up to this discussion ?<br></div><div class="gmail_extra"><br></div></div>