mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-05 22:50:14 +00:00
bfd: fix session lookup
local-address is optional for both IPv4 and IPv6. Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
This commit is contained in:
parent
057edd2e84
commit
0a731a72ee
@ -1731,7 +1731,7 @@ struct bfd_session *bfd_key_lookup(struct bfd_key key)
|
|||||||
inet_ntop(bs.key.family, &bs.key.peer, peer_buf,
|
inet_ntop(bs.key.family, &bs.key.peer, peer_buf,
|
||||||
sizeof(peer_buf));
|
sizeof(peer_buf));
|
||||||
/* Handle cases where local-address is optional. */
|
/* Handle cases where local-address is optional. */
|
||||||
if (bs.key.family == AF_INET) {
|
if (memcmp(&bs.key.local, &zero_addr, sizeof(bs.key.local))) {
|
||||||
memset(&bs.key.local, 0, sizeof(bs.key.local));
|
memset(&bs.key.local, 0, sizeof(bs.key.local));
|
||||||
bsp = hash_lookup(bfd_key_hash, &bs);
|
bsp = hash_lookup(bfd_key_hash, &bs);
|
||||||
if (bsp) {
|
if (bsp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user