zebra: remove duplicated code

Remove duplicated netlink error message length check.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
This commit is contained in:
Rafael Zalamena 2018-12-26 16:57:46 -02:00
parent a60df89e65
commit d0c893802a

View File

@ -820,14 +820,6 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
continue;
}
if (h->nlmsg_len
< NLMSG_LENGTH(sizeof(struct nlmsgerr))) {
flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: message truncated",
nl->name);
return -1;
}
/* Deal with errors that occur because of races
* in link handling */
if (zns->is_cmd