Merge pull request #7671 from idryzhov/bfd-fix-session-lookup

bfd: fix session lookup
This commit is contained in:
Rafael Zalamena 2020-12-07 10:09:34 -03:00 committed by GitHub
commit f1ca1dde81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1731,7 +1731,7 @@ struct bfd_session *bfd_key_lookup(struct bfd_key key)
inet_ntop(bs.key.family, &bs.key.peer, peer_buf,
sizeof(peer_buf));
/* 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));
bsp = hash_lookup(bfd_key_hash, &bs);
if (bsp) {