From patchwork Fri Apr 24 10:23:09 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "openwrt-devel@couprie.net" X-Patchwork-Id: 464160 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from arrakis.dune.hu (arrakis.dune.hu [78.24.191.176]) (using TLSv1.1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A0B96140134 for ; Fri, 24 Apr 2015 20:23:22 +1000 (AEST) Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id 6F1A62801B5; Fri, 24 Apr 2015 12:22:13 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on arrakis.dune.hu X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=BAYES_00,HTML_MESSAGE, T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.2 Received: from arrakis.dune.hu (localhost [127.0.0.1]) by arrakis.dune.hu (Postfix) with ESMTP id CFBAB280163 for ; Fri, 24 Apr 2015 12:22:09 +0200 (CEST) X-policyd-weight: using cached result; rate: -7.6 Received: from server-02.couprie.net (server-02.couprie.net [78.46.181.198]) by arrakis.dune.hu (Postfix) with ESMTP for ; Fri, 24 Apr 2015 12:22:09 +0200 (CEST) Received: from [10.0.0.66] (unknown [10.0.0.66]) by server-02.couprie.net (Postfix) with ESMTP id E983E24002B; Fri, 24 Apr 2015 12:23:07 +0200 (CEST) Message-ID: <553A198D.5020803@couprie.net> Date: Fri, 24 Apr 2015 12:23:09 +0200 From: "openwrt-devel@couprie.net" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: openwrt-devel@lists.openwrt.org References: <55395C5D.5030409@couprie.net> <55396229.9020000@darbyshire-bryant.me.uk> In-Reply-To: <55396229.9020000@darbyshire-bryant.me.uk> Subject: Re: [OpenWrt-Devel] dnsmasq and --dhcp-relay option ? X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openwrt-devel-bounces@lists.openwrt.org Sender: "openwrt-devel" Could something likes this be added ? dhcp_option_add() { Perry On 23-04-15 23:20, Kevin Darbyshire-Bryant wrote: > On 23/04/2015 21:55, openwrt-devel@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 --- 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" }