Skip to content

Commit

Permalink
ddns-scripts: get l3 device for bind network using curl
Browse files Browse the repository at this point in the history
If pppoe is used for wan access. script set 'eth1' as interface for curl
call. The correct interface is however 'pppoe-wan'.

The script uses 'network_get_physdev' function to get real device for
bind_network but this is wrong. We need instead the l3_device of the the
logical interface.

In case if we don't use pppoe connection - 'l3_device' is equal to real device.

This was reported by the github user `welderpb` with P/R:
 openwrt/packages#14431

Signed-off-by: Florian Eckert <[email protected]>
  • Loading branch information
feckert authored and Lienol committed Dec 19, 2021
1 parent d1ad1f7 commit 6fcc5ec
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion net/ddns-scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=ddns-scripts
PKG_VERSION:=2.8.2
PKG_RELEASE:=9
PKG_RELEASE:=10

PKG_LICENSE:=GPL-2.0

Expand Down
4 changes: 2 additions & 2 deletions net/ddns-scripts/files/usr/lib/ddns/dynamic_dns_functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -759,8 +759,8 @@ do_transfer() {
# force network/interface-device to use for communication
if [ -n "$bind_network" ]; then
local __DEVICE
network_get_physdev __DEVICE $bind_network || \
write_log 13 "Can not detect local device using 'network_get_physdev $bind_network' - Error: '$?'"
network_get_device __DEVICE $bind_network || \
write_log 13 "Can not detect local device using 'network_get_device $bind_network' - Error: '$?'"
write_log 7 "Force communication via device '$__DEVICE'"
__PROG="$__PROG --interface $__DEVICE"
fi
Expand Down

0 comments on commit 6fcc5ec

Please sign in to comment.