Modify

Opened 3 years ago

Last modified 3 years ago

#18273 new defect

6to4: stuck in INVALID_LOCAL_ADDRESS

Reported by: Catalin Patulea <cronos586@…> Owned by: developers
Priority: normal Milestone:
Component: packages Version: Trunk
Keywords: ipv6 6to4 Cc:

Description

# ubus call network.interface.wan6 status
{

"up": false,
"pending": true,
"available": true,
"autostart": true,
"proto": "6to4",
"data": {},
"errors": [{

"subsystem": "6to4",
"code": "INVALID_LOCAL_ADDRESS"

}

]

}

# ubus call network.interface.wan status
{

"up": true,
"pending": false,
"available": true,
"autostart": true,
"uptime": 519872,
"l3_device": "eth1",
"proto": "dhcp",
"device": "eth1",
"metric": 0,
"delegation": true,
"ipv4-address": [{

"address": "198.48.205.121",
"mask": 27

}

],
"ipv6-address": [],
"ipv6-prefix": [],
"ipv6-prefix-assignment": [],
"route": [{

"target": "192.168.100.0",
"mask": 24,
"nexthop": "0.0.0.0",
"source": "0.0.0.0\/0"

}, {

"target": "0.0.0.0",
"mask": 0,
"nexthop": "198.48.205.97",
"source": "0.0.0.0\/0"

}

],
"dns-server": [

"206.248.154.22",
"206.248.154.170"

],
"dns-search": [],
"inactive": {

"ipv4-address": [
],
"ipv6-address": [
],
"route": [
],
"dns-server": [
],
"dns-search": [
]

},
"data": {
}

}

eth1's upstream is a cable modem which, when it has lost coax connection to my ISP, hands out DHCP leases in the range 192.168.100.0/24. (I know this could be considered "broken" network behaviour but I don't have control over it.) When the coax connection is established, the cable modem starts forwarding DHCP requests to my ISP, which assigns a public IP as shown above.

I *suspect* that "wan" previously came up with 192.168.100.x, 6to4 attempted to come up, but failed due to:

test_6to4_rfc1918 "$ipaddr" && {

proto_notify_error "$cfg" "INVALID_LOCAL_ADDRESS"
return

}

http://git.openwrt.org/?p=openwrt.git;a=blob;f=package/network/ipv6/6to4/files/6to4.sh;h=ce1de53ea851d405bdf2303ee00d0ddb3d2c919e;hb=HEAD#l55

Later, I got the public IP, but wan6 was still stuck in INVALID_LOCAL_ADDRESS state.

Can INVALID_LOCAL_ADDRESS be made retriable, so that when 'wan' IP address changes the second time, 6to4 makes another attempt at bringing up wan6?

Attachments (0)

Change History (1)

comment:1 Changed 3 years ago by Catalin Patulea <cronoss586@…>

I'm still running into this regularly. IPv6 is not a critical service on my network, but it would be nice for it to work reliably.

To recap what I think is happening:

  • My cable modem reboots for whatever reason (triggered by ISP, or maybe occasional crash, I don't know).
  • OpenWrt notices link cycle, and when link comes back up, starts DHCP client.
  • The *cable modem* gives the router an IP in 192.168.100.* because the CM isn't on the upstream (coax) network yet.
  • OpenWrt acquires this IP, and triggers wan6 6to4 to start, too.
  • 6to4 notices the RFC1918 and wedges wan6 in 'INVALID_LOCAL_ADDRESS' state.
  • Somehow (not clear on this part), when the cable modem registers on the network, OpenWrt acquires a new DHCP lease, with a valid IPv4 public routable address. This lease comes from further up in the network (cable modem switches to DHCP relaying). If 6to4 retried at this point, it would succeed and bring up IPv6.

Is there a recommended workaround here? I do want to have connectivity to my modem before it registers on the coax network.

Can 'INVALID_LOCAL_ADDRESS' be made retriable (I think I saw other errors that are retriable, and could adapt that handling), so that wan6 retries after wan gets its real public IPv4?

Add Comment

Modify Ticket

Action
as new .
Author


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

 
Note: See TracTickets for help on using tickets.