]> git.proxmox.com Git - mirror_frr.git/commitdiff
zebra: remove duplicated code
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 26 Dec 2018 18:57:46 +0000 (16:57 -0200)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Wed, 26 Dec 2018 19:06:35 +0000 (17:06 -0200)
Remove duplicated netlink error message length check.

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
zebra/kernel_netlink.c

index afc3985854a8ee696fa3fa20233c867cff012d2a..399062eeafde9746d7419cce80ccd78746a02dec 100644 (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