Modify

Opened 8 years ago

Closed 4 years ago

#7570 closed defect (worksforme)

ddns-script - 3g interface only (no wan)

Reported by: anonymous Owned by: jow
Priority: high Milestone: Backfire 10.03.1
Component: packages Version: Backfire 10.03
Keywords: Cc:

Description

I have the stable version of backfire running on a TP-1043. The ddns-script does not recognise IP changes on a 3G-interface/3g Network configuration without wan (want to keep this for future use).

ddns OK:
if i use a "wan interface - 3g konfiguration" ddns-script is ok, but 3g on this config was not stable

ddns not OK:
if i use "explicit 3g interface - 3g konfiguration", the ddns-script (with 3g entries) doesnt work ...

... and funny:
"ACTION=ifup INTERFACE=wan /sbin/hotplug-call iface" works (wan config is emty)

Attachments (0)

Change History (7)

comment:1 Changed 8 years ago by porter.adam@…

This is because the hotplug script provided with ddns-scripts only checks for the interface named "wan"

Try adding your interface:

if [ "$INTERFACE" = "wan" ] || [ "$INTERFACE" = "mobilebroadband" ] && [ "$ACTION" = "ifup" ] 
then
	start_daemon_for_all_ddns_sections
fi

Ideally DDNS should be configured on a per-interface setting. For instance when my DSL comes up I may want to update an IP on one account, and when my mobile broadband comes up I may want to update an IP on a second account. The method above just shotguns all ddns accounts on all interfaces when any one gets ifup'd

The fix should be as simple as looping through ddns entries in UCI, grabbing the "network" (which should be changed to "interface"... 'network' and 'interface' seem to be used interchangeably throughout openwrt and caused me quite a bit of confusion...) assigned to it, then checking if that's the interface which was just ifup'd.

comment:2 Changed 7 years ago by ithamar.adema@…

The way we solved this for similar situations is use a 'wan' zone in the firewall configuration, and include all possible wan interfaces in there. The system was capable of using a ethernet port as WAN port, a 3G dongle, or a builtin DSL modem (ifxmips architecture).

Then things like ddns, and others simply checked in the hotplug iface script if the interface was contained in the WAN zone, and if so, did their thing.

comment:3 Changed 7 years ago by jow

  • Owner changed from developers to jow
  • Status changed from new to accepted

comment:4 Changed 7 years ago by jow

  • Resolution set to fixed
  • Status changed from accepted to closed

Fixed with r27657 - you may now specify "option interface mobilebroadband".

comment:5 Changed 6 years ago by jr-

  • Resolution fixed deleted
  • Status changed from closed to reopened

Hi. Problem is still present with r29697 on Buffalo WZR-HP-G300H. IP of 3G connection is registered on dynamic DNS only if it's named "wan".

Fix is to not search for interface named "wan" but instead use $event_interface variable.



Old code:

                config_get iface "$section" interface "wan"
                [ "$iface" = "$event_interface" ] || continue


New code:

                config_get iface "$section" interface "$event_interface"
                [ "$iface" = "$event_interface" ] || continue


comment:6 Changed 6 years ago by porter.adam@…

config_get iface "$section" interface "wan"

grabs the value in option "interface" and defaults to "wan" if none is found.

You should specify the interface in your DDNS config and the script will pick it up.

comment:7 Changed 4 years ago by tripolar

  • Resolution set to worksforme
  • Status changed from reopened to closed

can't reproduce. do what porter.adam recommends

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.