Messages in this thread | | | Date | Mon, 23 Nov 2020 07:18:07 +0100 | From | Martin Schiller <> | Subject | Re: [PATCH net-next v5] net/tun: Call netdev notifiers |
| |
On 2020-11-20 19:28, Jakub Kicinski wrote: > On Wed, 18 Nov 2020 07:39:19 +0100 Martin Schiller wrote: >> Call netdev notifiers before and after changing the device type. >> >> Signed-off-by: Martin Schiller <ms@dev.tdt.de> > > This is a fix, right? Can you give an example of something that goes > wrong without this patch?
This change is related to my latest patches to the X.25 Subsystem: https://patchwork.kernel.org/project/netdevbpf/list/?series=388087
I use a tun interface in a XoT (X.25 over TCP) application and use the TUNSETLINK ioctl to change the device type to ARPHRD_X25. As the default device type is ARPHRD_NONE the initial NETDEV_REGISTER event won't be catched by the X.25 Stack.
Therefore I have to use the NETDEV_POST_TYPE_CHANGE to make sure that the corresponding neighbour structure is created.
I could imagine that other protocols have similar requirements.
Whether this is a fix or a functional extension is hard to say.
Some time ago there was also a corresponding patch for the WAN/HDLC subsystem:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit?id=2f8364a291e8
| |