zebra: flow control (Coverity 1462467 1465497)

Signed-off-by: F. Aragon <paco@voltanet.io>
This commit is contained in:
paco 2018-06-21 12:59:22 +02:00
parent 76cd18c9dd
commit 0cfbff749e
No known key found for this signature in database
GPG Key ID: FD112A8C7E6A5E4A
2 changed files with 5 additions and 9 deletions

View File

@ -307,7 +307,7 @@ ns_id_t zebra_ns_id_get(const char *netnspath)
nlh = (struct nlmsghdr *)((char *)nlh nlh = (struct nlmsghdr *)((char *)nlh
+ NETLINK_ALIGN( + NETLINK_ALIGN(
nlh->nlmsg_len)); nlh->nlmsg_len));
} while (len != 0 && return_nsid != NS_UNKNOWN && ret == 0); } while (len != 0 && ret == 0);
} }
close(fd); close(fd);

View File

@ -1428,18 +1428,14 @@ static void rib_process_update_fib(struct zebra_vrf *zvrf,
if (new != old) if (new != old)
zlog_debug( zlog_debug(
"%u:%s: Deleting route rn %p, re %p (type %d) " "%u:%s: Deleting route rn %p, re %p (type %d) "
"old %p (type %d) - %s", "old %p (type %d) - nexthop inactive",
zvrf_id(zvrf), buf, rn, new, zvrf_id(zvrf), buf, rn, new,
new->type, old, old->type, new->type, old, old->type);
nh_active ? "install failed"
: "nexthop inactive");
else else
zlog_debug( zlog_debug(
"%u:%s: Deleting route rn %p, re %p (type %d) - %s", "%u:%s: Deleting route rn %p, re %p (type %d) - nexthop inactive",
zvrf_id(zvrf), buf, rn, new, zvrf_id(zvrf), buf, rn, new,
new->type, new->type);
nh_active ? "install failed"
: "nexthop inactive");
} }
/* If labeled-unicast route, uninstall transit LSP. */ /* If labeled-unicast route, uninstall transit LSP. */