gtp: do not allow adding duplicate tid and ms_addr pdp context
authorTaehee Yoo <ap420073@gmail.com>
Wed, 11 Dec 2019 08:23:00 +0000 (08:23 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 4 Jan 2020 13:00:17 +0000 (14:00 +0100)
commit0ddfaacfb76d8d54a1f94bfa4e4bc9a7c452d4c7
tree846908e18ff53e181399683394488b0c48f9bac8
parentde211c95f9b107b001d8864bfc8e45f62bcb6614
gtp: do not allow adding duplicate tid and ms_addr pdp context

[ Upstream commit 6b01b1d9b2d38dc84ac398bfe9f00baff06a31e5 ]

GTP RX packet path lookups pdp context with TID. If duplicate TID pdp
contexts are existing in the list, it couldn't select correct pdp context.
So, TID value  should be unique.
GTP TX packet path lookups pdp context with ms_addr. If duplicate ms_addr pdp
contexts are existing in the list, it couldn't select correct pdp context.
So, ms_addr value should be unique.

Fixes: 459aa660eb1d ("gtp: add initial driver for datapath of GPRS Tunneling Protocol (GTP-U)")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/gtp.c