[source] dnsmasq: use logical interface name for dhcp relay config

LEDE Commits lede-commits at lists.infradead.org
Wed Mar 29 12:04:49 PDT 2017


dedeckeh pushed a commit to source.git, branch master:
https://git.lede-project.org/5d4aecee3e9c94c04b151d3005fa5287610d31e1

commit 5d4aecee3e9c94c04b151d3005fa5287610d31e1
Author: Karl Vogel <karl.vogel at gmail.com>
AuthorDate: Wed Mar 29 11:39:35 2017 +0200

    dnsmasq: use logical interface name for dhcp relay config
    
    The relay section should use the logical interface name and
    not the linux network device name directly. This to be
    consistent with other sections of the dnsmasq config where
    'interface' means the logical interface.
    
    Signed-off-by: Karl Vogel <karl.vogel at gmail.com>
---
 package/network/services/dnsmasq/files/dnsmasq.init | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/package/network/services/dnsmasq/files/dnsmasq.init b/package/network/services/dnsmasq/files/dnsmasq.init
index 1b3157e..5f69be7 100644
--- a/package/network/services/dnsmasq/files/dnsmasq.init
+++ b/package/network/services/dnsmasq/files/dnsmasq.init
@@ -655,7 +655,8 @@ dhcp_relay_add() {
 	if [ -z "$interface" ]; then
 		xappend "--dhcp-relay=$local_addr,$server_addr"
 	else
-		xappend "--dhcp-relay=$local_addr,$server_addr,$interface"
+		network_get_device ifname "$interface" || return
+		xappend "--dhcp-relay=$local_addr,$server_addr,$ifname"
 	fi
 }
 



More information about the lede-commits mailing list