OpenWrt/LEDE Project

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category Base system
  • Assigned To
    Hans Dedecker
  • Operating System All
  • Severity Medium
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by bolvan - 29.09.2021
Last edited by Hans Dedecker - 30.10.2021

FS#4058 - netifd fails to delete 6to4 tunnel

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

Closed by  Hans Dedecker
30.10.2021 19:18
Reason for closing:  Fixed
Additional comments about closing:  

Fixed in commit https://git.op enwrt.org/?p=project/netifd.git;a=commit ;h=8f82742ca4f47f459284f3a07323d04da72ea 5f6

bolvan commented on 29.09.2021 20:07

I selected 5.10 testing kernel in my snapshot build
its 5.10.64

Project Manager
Hans Dedecker commented on 18.10.2021 20:04

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

bolvan commented on 27.10.2021 19:54

Yes, it works with this patch

Project Manager
Hans Dedecker commented on 28.10.2021 06:21

Thank you for testing the patch

Sven Roederer commented on 14.11.2021 00:21

Also affects OpenWrt-21.02

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing