Browse Source

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 <[email protected]>
Karl Vogel 8 years ago
parent
commit
5d4aecee3e
1 changed files with 2 additions and 1 deletions
  1. 2 1
      package/network/services/dnsmasq/files/dnsmasq.init

+ 2 - 1
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
 }