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#4058 - netifd fails to delete 6to4 tunnel #9099

Closed
openwrt-bot opened this issue Sep 29, 2021 · 6 comments
Closed

FS#4058 - netifd fails to delete 6to4 tunnel #9099

openwrt-bot opened this issue Sep 29, 2021 · 6 comments
Labels

Comments

@openwrt-bot
Copy link

openwrt-bot commented Sep 29, 2021

bolvan:

tp-link archer c6u
openwrt snapshot r0-9c3b1d5
After upgrade to snapshot version from 21.02 I found that netifd infinitely retries to ifup 6to4 interface with lots of messages in the syslog
On 'ifdown 6to4' netifd should delete 6to4-6to4 interface but it can't
link still remains and this causes error during 'ifup 6to4'
ioctl SIOCADDTUNNEL returns ENOBUFFS
If the link is manually deleted then netifd succeeds

I traced the problem in netifd c code and found this non-working code

static int __system_del_ip_tunnel(const char *name, struct blob_attr **tb)
{
struct blob_attr *cur;
const char *str;

if (!(cur = tb[TUNNEL_ATTR_TYPE]))
	return -EINVAL;
str = blobmsg_data(cur);

if (!strcmp(str, "greip") || !strcmp(str, "gretapip") ||
    !strcmp(str, "greip6") || !strcmp(str, "gretapip6") ||
    !strcmp(str, "vtiip") || !strcmp(str, "vtiip6") ||
    !strcmp(str, "vxlan") || !strcmp(str, "vxlan6") ||
    !strcmp(str, "xfrm"))
	return system_link_del(name);
else
{
            // THIS DOES NOT WORK. I guess interface name should not be passed as the 1st parameter but inside special structure in the third parameter (see SIOCADDTUNNEL)
	return tunnel_ioctl(name, SIOCDELTUNNEL, NULL);
}

}

with additional !strcmp(str, "sit") it starts working again

@openwrt-bot
Copy link
Author

openwrt-bot commented Sep 29, 2021

bolvan:

I selected 5.10 testing kernel in my snapshot build
its 5.10.64

@openwrt-bot
Copy link
Author

openwrt-bot commented Oct 18, 2021

dedeckeh:

Can you check if the attached netifd patch fixes the problem ?

@openwrt-bot
Copy link
Author

openwrt-bot commented Oct 27, 2021

bolvan:

Yes, it works with this patch

@openwrt-bot
Copy link
Author

openwrt-bot commented Oct 28, 2021

dedeckeh:

Thank you for testing the patch

@openwrt-bot
Copy link
Author

openwrt-bot commented Nov 14, 2021

SAm0815:

Also affects OpenWrt-21.02

@openwrt-bot
Copy link
Author

openwrt-bot commented Nov 17, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant