dnsmasq: use logical interface name for dhcp relay config
authorKarl Vogel <karl.vogel@gmail.com>
Wed, 29 Mar 2017 09:39:35 +0000 (11:39 +0200)
committerJo-Philipp Wich <jo@mein.io>
Thu, 1 Jun 2017 22:07:02 +0000 (00:07 +0200)
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@gmail.com>
package/network/services/dnsmasq/files/dnsmasq.init

index e811a20d1fa1a90ed534e7cdd8fd139ca7a46524..cce7558fc9720a2c2917ee3f9d93aeff8727a093 100644 (file)
@@ -526,7 +526,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
 }