summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfdd/bfd.c6
-rw-r--r--bfdd/ptm_adapter.c3
2 files changed, 5 insertions, 4 deletions
diff --git a/bfdd/bfd.c b/bfdd/bfd.c
index 5d143d4e5f..2a41758bbc 100644
--- a/bfdd/bfd.c
+++ b/bfdd/bfd.c
@@ -391,10 +391,8 @@ struct bfd_session *ptm_bfd_sess_find(struct bfd_pkt *cp,
/* Search for session without using discriminator. */
ifp = if_lookup_by_index(ifindex, vrfid);
- if (vrfid != VRF_DEFAULT)
- vrf = vrf_lookup_by_id(vrfid);
- else
- vrf = NULL;
+
+ vrf = vrf_lookup_by_id(vrfid);
gen_bfd_key(&key, peer, local, is_mhop, ifp ? ifp->name : NULL,
vrf ? vrf->name : VRF_DEFAULT_NAME);
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c
index 3e2ace6ea6..553033abfb 100644
--- a/bfdd/ptm_adapter.c
+++ b/bfdd/ptm_adapter.c
@@ -376,6 +376,9 @@ static int _ptm_msg_read(struct stream *msg, int command, vrf_id_t vrf_id,
log_error("ptm-read: vrf id %u could not be identified", vrf_id);
return -1;
}
+ } else {
+ bpc->bpc_has_vrfname = true;
+ strlcpy(bpc->bpc_vrfname, VRF_DEFAULT_NAME, sizeof(bpc->bpc_vrfname));
}
STREAM_GETC(msg, bpc->bpc_cbit);