ifindex_t ifindex = IFINDEX_INTERNAL;
struct sockaddr_any local, peer;
uint8_t msgbuf[1516];
+ struct interface *ifp = NULL;
struct bfd_vrf_global *bvrf = THREAD_ARG(t);
vrfid = bvrf->vrf->vrf_id;
&local, &peer);
}
+ /* update vrf-id because when in vrf-lite mode,
+ * the socket is on default namespace
+ */
+ if (ifindex) {
+ ifp = if_lookup_by_index(ifindex, vrfid);
+ if (ifp)
+ vrfid = ifp->vrf_id;
+ }
+
/* Implement RFC 5880 6.8.6 */
if (mlen < BFD_PKT_LEN) {
cp_debug(is_mhop, &peer, &local, ifindex, vrfid,