bfdd: if no vrfname is passed, use default vrf name

default vrf name is used to forge the key that permits storing the
session.

Signed-off-by: Philippe Guibert <philippe.guibert@6wind.com>
This commit is contained in:
Philippe Guibert 2019-06-19 17:49:32 +02:00
parent 3a20889ff6
commit e0f36c91e2

View File

@ -685,6 +685,9 @@ static int bfd_configure_peer(struct bfd_peer_cfg *bpc, bool mhop,
snprintf(ebuf, ebuflen, "vrf name too long");
return -1;
}
} else {
bpc->bpc_has_vrfname = true;
strlcpy(bpc->bpc_vrfname, VRF_DEFAULT_NAME, sizeof(bpc->bpc_vrfname));
}
return 0;