summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlexander Chernavin <achernavin@netgate.com>2021-10-20 11:52:46 +0000
committerMatthew Smith <mgsmith@netgate.com>2022-03-03 14:26:48 +0000
commit87e92c6586747a790ae514effb79b86a3e53958e (patch)
treea779cccd2027c98b66351861d6a0cb18ef2b6ed6 /src
parentadac308aa8033de28ec9e627af2ed517f37aba6a (diff)
linux-cp: make check of message ts null-tolerant
Type: improvement For some message types, timestamps are checked on netlink message to decide whether the message should be applied. For notification messages timestamps are expected to be always available. With this change, before accessing the timestamp, make sure the message info object that carries it is not null. If it is null, pass the check. This is to be ready to process dump replies that will not need the timestamp check and will have the message info object set to null. Signed-off-by: Alexander Chernavin <achernavin@netgate.com> Change-Id: Ic7211c0d451d72f6a5248898b3a8f8e0bca8f7aa
Diffstat (limited to 'src')
-rw-r--r--src/plugins/linux-cp/lcp_router.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/linux-cp/lcp_router.c b/src/plugins/linux-cp/lcp_router.c
index c70acfff1be..d99de9ca24d 100644
--- a/src/plugins/linux-cp/lcp_router.c
+++ b/src/plugins/linux-cp/lcp_router.c
@@ -133,6 +133,9 @@ lcp_router_intf_h2p (u32 host)
static int
lcp_router_lip_ts_check (nl_msg_info_t *msg_info, lcp_itf_pair_t *lip)
{
+ if (!msg_info)
+ return 0;
+
if (msg_info->ts > lip->lip_create_ts)
return 0;