Skip to content

Commit 9cd00fb

Browse files
rbqvqfeckert
authored andcommitted
ddns-scripts: get l3 device for bind network using curl
If pppoe is used for wan access. script set 'eth1' as interface for curl call. The correct interface is however 'pppoe-wan'. These scripts use '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. Follow P/R: #14431 Signed-off-by: Coia Prant <[email protected]>
1 parent a36979c commit 9cd00fb

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

net/ddns-scripts/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
88

99
PKG_NAME:=ddns-scripts
1010
PKG_VERSION:=2.8.2
11-
PKG_RELEASE:=58
11+
PKG_RELEASE:=59
1212

1313
PKG_LICENSE:=GPL-2.0
1414

net/ddns-scripts/files/usr/lib/ddns/update_cloudflare_com_v4.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,8 @@ __PRGBASE="$CURL -RsS -o $DATFILE --stderr $ERRFILE"
9696
# force network/interface-device to use for communication
9797
if [ -n "$bind_network" ]; then
9898
local __DEVICE
99-
network_get_physdev __DEVICE $bind_network || \
100-
write_log 13 "Can not detect local device using 'network_get_physdev $bind_network' - Error: '$?'"
99+
network_get_device __DEVICE $bind_network || \
100+
write_log 13 "Can not detect local device using 'network_get_device $bind_network' - Error: '$?'"
101101
write_log 7 "Force communication via device '$__DEVICE'"
102102
__PRGBASE="$__PRGBASE --interface $__DEVICE"
103103
fi

net/ddns-scripts/files/usr/lib/ddns/update_dnspod_cn.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ build_command() {
2828
# bind host/IP
2929
if [ -n "$bind_network" ]; then
3030
local __DEVICE
31-
network_get_physdev __DEVICE $bind_network || write_log 13 "Can not detect local device using 'network_get_physdev $bind_network' - Error: '$?'"
31+
network_get_device __DEVICE $bind_network || write_log 13 "Can not detect local device using 'network_get_device $bind_network' - Error: '$?'"
3232
write_log 7 "Force communication via device '$__DEVICE'"
3333
__CMDBASE="$__CMDBASE --interface $__DEVICE"
3434
fi

net/ddns-scripts/files/usr/lib/ddns/update_dnspod_cn_v3.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ tencentcloud_transfer() {
120120
# force network/interface-device to use for communication
121121
if [ -n "$bind_network" ]; then
122122
local __DEVICE
123-
network_get_physdev __DEVICE $bind_network ||
124-
write_log 13 "Can not detect local device using 'network_get_physdev $bind_network' - Error: '$?'"
123+
network_get_device __DEVICE $bind_network ||
124+
write_log 13 "Can not detect local device using 'network_get_device $bind_network' - Error: '$?'"
125125
write_log 7 "Force communication via device '$__DEVICE'"
126126
__PRGBASE="$__PRGBASE --interface $__DEVICE"
127127
fi

net/ddns-scripts/files/usr/lib/ddns/update_godaddy_com_v1.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ __PRGBASE="$CURL -RsS -w '%{http_code}' -o $DATFILE --stderr $ERRFILE"
9393
# force network/interface-device to use for communication
9494
if [ -n "$bind_network" ]; then
9595
local __DEVICE
96-
network_get_physdev __DEVICE $bind_network || \
97-
write_log 13 "Can not detect local device using 'network_get_physdev $bind_network' - Error: '$?'"
96+
network_get_device __DEVICE $bind_network || \
97+
write_log 13 "Can not detect local device using 'network_get_device $bind_network' - Error: '$?'"
9898
write_log 7 "Force communication via device '$__DEVICE'"
9999
__PRGBASE="$__PRGBASE --interface $__DEVICE"
100100
fi

net/ddns-scripts/files/usr/lib/ddns/update_luadns_v1.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,8 +76,8 @@ __PRGBASE="$CURL -RsS -w '%{http_code}' -o $DATFILE --stderr $ERRFILE"
7676
# force network/interface-device to use for communication
7777
if [ -n "$bind_network" ]; then
7878
local __DEVICE
79-
network_get_physdev __DEVICE $bind_network || \
80-
write_log 13 "Can not detect local device using 'network_get_physdev $bind_network' - Error: '$?'"
79+
network_get_device __DEVICE $bind_network || \
80+
write_log 13 "Can not detect local device using 'network_get_device $bind_network' - Error: '$?'"
8181
write_log 7 "Force communication via device '$__DEVICE'"
8282
__PRGBASE="$__PRGBASE --interface $__DEVICE"
8383
fi

0 commit comments

Comments
 (0)