summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2017-03-03 08:51:08 +0100
committerDamjan Marion <dmarion.lists@gmail.com>2017-03-06 16:17:21 +0000
commit0e2e0dfe8b6783641e779b01a4b8e9ebf0e6fc77 (patch)
treee98e908acec606055efb3f545f2d8b887dedf1ee /src/vnet
parent0491ac9aed90e26a54d7b45b469812e6c9fe2f4c (diff)
BFD: drop rpc call if packet doesn't match session
In a very unlikely scenario, during which a session is removed and replaced with a different session sharing the same session index, while a packet is in-flight during RPC call, drop that packet. Change-Id: If1c4a77fc2ab460bae2435db066a133185b98747 Signed-off-by: Klement Sekera <ksekera@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/bfd/bfd_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vnet/bfd/bfd_main.c b/src/vnet/bfd/bfd_main.c
index 01de637531d..d38623c1e0a 100644
--- a/src/vnet/bfd/bfd_main.c
+++ b/src/vnet/bfd/bfd_main.c
@@ -1555,7 +1555,7 @@ void
bfd_consume_pkt (bfd_main_t * bm, const bfd_pkt_t * pkt, u32 bs_idx)
{
bfd_session_t *bs = bfd_find_session_by_idx (bm, bs_idx);
- if (!bs)
+ if (!bs || (pkt->your_disc && pkt->your_disc != bs->local_discr))
{
return;
}