Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FS#4216 - ds-lite: Command failed: Invalid argument #9195

Open
openwrt-bot opened this issue Jan 1, 2022 · 5 comments
Open

FS#4216 - ds-lite: Command failed: Invalid argument #9195

openwrt-bot opened this issue Jan 1, 2022 · 5 comments
Labels
flyspray release/21.02

Comments

@openwrt-bot
Copy link

@openwrt-bot openwrt-bot commented Jan 1, 2022

hrw:

====== System info ======

  • Device problem occurs on
    • x86-64 based router
  • Software versions of OpenWrt/LEDE release, packages, etc.
    • OpenWrt 21.02.1

====== ISP connectivity options ======
My ISP (Orange Polska) provides two options for network connectivity:

  • IPv4
  • IPv6 with DS-Lite

My WAN interface is called "Orange".

===== IPv4 =====

IPv4 setup works fine. My router uses PPPoE to authenticate, setup all routes etc and things "just works".

===== IPv6 =====

IPv6 is more problematic. I can setup IPv6 only network (including LAN clients). But to get IPv4 connectivity I need to setup DS-Lite.

Installed 'ds-lite' package. Used tcpdump to get AFTR address from DHCPv6 packets. Reconfigured "Orange_6" and "Orange_DS_lite":

config interface 'Orange'
option proto 'pppoe'
option device 'eth0.35'
option username 'bez_ochrony-REDACTED@neostrada.pl/ipv6'
option password 'REDACTED'
option ipv6 'auto'
option ip6assign '64'

config interface 'Orange_6'
option proto 'dhcpv6'
option device '@Orange'
option iface_dslite 'Orange_DS_lite'
option reqaddress 'try'
option reqprefix 'auto'
option reqopts '64'

config interface 'Orange_DS_lite'
option proto 'dslite'
option peeraddr 'szcz01f.cgn.tpnet.pl'
option ip6addr '2a01:ZZZZ:YYYY:XXXX::1'
option encaplimit 'ignore'

I can see (from debug output added in /lib/netifd/proto/dslite.sh and /lib/netifd/netifd-proto.sh scripts) that it tries to configure DS-Lite link:

Sat Jan 1 13:11:14 2022 daemon.notice netifd: Orange_DS_lite (13810): dslite.sh: ip6addr: 2a01:ZZZZ:YYYY:XXXX::1 Sat Jan 1 13:11:14 2022 daemon.notice netifd: Orange_DS_lite (13810): dslite.sh: peeraddr: 2a01:1000:0:1::9114 Sat Jan 1 13:11:14 2022 daemon.notice netifd: Orange_DS_lite (13810): _proto_notify(): iface=Orange_DS_lite opts= Sat Jan 1 13:11:14 2022 daemon.notice netifd: Orange_DS_lite (13810): _proto_notify(): json_dump={ "action": 0, "ifname": "ds-Orange_DS_lite", "link-up": true, "tunnel": { "mode": "ipip6", "mtu": 1280, "ttl": 64, "local": "2a01:ZZZZ:YYYY:XXXX::1", "remote": "2a01:1000:0:1::9114", "data": { "encaplimit": "ignore" } }, "data": { "firewall": [ { "type": "nat", "target": "ACCEPT" } ] }, "keep": false, "ipaddr": [ { "ipaddr": "192.0.0.2", "ptp": "192.0.0.1" } ], "routes": [ { "target": "0.0.0.0", "netmask": "0" } ], "interface": "Orange_DS_lite" } Sat Jan 1 13:11:14 2022 daemon.notice netifd: Orange_DS_lite (13810): Command failed: Invalid argument

And then it loops and floods log with repeated failures.

What is wrong?

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 1, 2022

hrw:

Installed 'ip-full' to have 'ip -6 tunnel' working.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 11, 2022

argonym:

Installed 'ip-full' to have 'ip -6 tunnel' working.

So this fixed the issue?
Or did you mean to note that the (required?) full flavor of the ip tool is present?

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 12, 2022

hrw:

It does not fixed the issue.

I installed it when tried to skip dslite.sh script and setup such tunnel by hand. "busybox ip" lacks tunnel subcommand.

So left comment in case it mattered.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 12, 2022

hrw:

Some debugs later:

Wed Jan 12 12:53:40 2022 daemon.notice netifd: Orange_DS_lite (8544): _proto_notify(): iface=Orange_DS_lite opts=
Wed Jan 12 12:53:40 2022 daemon.notice netifd: Orange_DS_lite (8544): _proto_notify(): { "action": 0, "ifname": "ds-Orange_DS_lite", "link-up": true, "tunnel": { "mode": "ipip6", "mtu": 1280, "ttl": 64, "local": "2a01:ZZZZ:YYYY:XXXX::1", "remote": "2a01:1000:0:1::9114", "data": { "encaplimit": "ignore" } }, "data": { "firewall": [ { "type": "nat", "target": "ACCEPT" } ] }, "keep": false, "ipaddr": [ { "ipaddr": "192.0.0.2", "ptp": "192.0.0.1" } ], "routes": [ { "target": "0.0.0.0", "netmask": "0" } ], "interface": "Orange_DS_lite" }
Wed Jan 12 12:53:40 2022 daemon.notice netifd: Orange_DS_lite (8544): Command failed: Invalid argument

That's _proto_notify() from /lib/netifd/netifd-proto.sh:

_proto_notify() { local interface="$1" local options="$2" echo "_proto_notify(): iface=$1 opts=$2" json_add_string "interface" "$interface" echo "_proto_notify(): $(json_dump)" ubus $options call network.interface notify_proto "$(json_dump)" }

I added echo lines to find out what it gets.

@openwrt-bot
Copy link
Author

@openwrt-bot openwrt-bot commented Jan 12, 2022

hrw:

Same "command failed" with and without "ip-full" package installed.

@aparcar aparcar added the release/21.02 label Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray release/21.02
Projects
None yet
Development

No branches or pull requests

2 participants