l2tp: Support different protocol versions with same IP/port quadruple
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 9 May 2024 20:58:12 +0000 (22:58 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 13 May 2024 22:49:42 +0000 (15:49 -0700)
commit364798056f518b0bf2f17cd9eaf0dd4e856d7393
tree7589dc4afae1173687e1ea71569f14fa641f6198
parentec8c25746e3232634f7842755a0c4bc08def6a49
l2tp: Support different protocol versions with same IP/port quadruple

628bc3e5a1be ("l2tp: Support several sockets with same IP/port quadruple")
added support for several L2TPv2 tunnels using the same IP/port quadruple,
but if an L2TPv3 socket exists it could eat all the trafic. We thus have to
first use the version from the packet to get the proper tunnel, and only
then check that the version matches.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: James Chapman <jchapman@katalix.com>
Link: https://lore.kernel.org/r/20240509205812.4063198-1-samuel.thibault@ens-lyon.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/l2tp/l2tp_core.c