After system switch from 11-p8 to 12 nested PPTP & L2TP tunnels based on MPD5 does not work. Got this error: kernel: ng0: if_output recursively called too many (2) After analyzing commits, found that for GIF, GRE and ME interfaces tunnel nesting limit check introduced and limit can be set by sysctl net.link.gif.max_nesting (man if_gif(4)): https://svnweb.freebsd.org/base?view=revision&revision=336131 For the netgraph based tunnel nesting limit is checked against 1 and this limit can not be set by systcl: https://svnweb.freebsd.org/base?view=revision&revision=337278
Mentioned changes seems do not change the behavior. The previous limit in the ng_iface node was 1. But I'm not very familiar with this code. Gleb can you take a look?
I think I see what happened. The previous code in the ng_iface did not count number of tags, it only could fail when ifnet pointer was the same. So, it doesn't fully match the behavior that if_tunnel_check_nesting() has.
Created attachment 201808 [details] suggested patch Hi! Can you please test this patch and confirm that desired behavior is achieved?
Asked initial problem reporter to check out patch.
Andrey and Gleb thanks for the suggested patch. Patch confirmed by Слава Трофимов to be working! All credits/thanks to Слава Трофимов and to others participated on this topic discussion: https://www.opennet.ru/openforum/vsluhforumID1/97363.html
A commit references this bug: Author: glebius Date: Fri Feb 8 06:19:29 UTC 2019 New revision: 343895 URL: https://svnweb.freebsd.org/changeset/base/343895 Log: Allow some nesting of ng_iface(4) interfaces and add a configuration knob. PR: 235500 MFC after: 1 week Changes: head/share/man/man4/ng_iface.4 head/sys/netgraph/ng_iface.c
A commit references this bug: Author: glebius Date: Fri Feb 15 00:29:45 UTC 2019 New revision: 344139 URL: https://svnweb.freebsd.org/changeset/base/344139 Log: Merge r343895: Allow some nesting of ng_iface(4) interfaces and add a configuration knob. PR: 235500 Changes: _U stable/12/ stable/12/share/man/man4/ng_iface.4 stable/12/sys/netgraph/ng_iface.c