]> git.proxmox.com Git - mirror_frr.git/blobdiff - pimd/mtracebis_routeget.c
zebra: Allow ns delete to happen after under/over flow checks
[mirror_frr.git] / pimd / mtracebis_routeget.c
index d75aaa3708bb5e6436552dcfb30056442b257857..8d974403ac631e8e100a5fba4c989f992bd6854a 100644 (file)
  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
 #ifdef __linux__
 
 #include <asm/types.h>
@@ -81,7 +85,7 @@ int routeget(struct in_addr dst, struct in_addr *src, struct in_addr *gw)
 
        ret = rtnl_open(&rth, 0);
 
-       if (ret < 0)
+       if (ret < 0 || rth.fd <= 0)
                return ret;
 
        if (rtnl_talk(&rth, &req.n, 0, 0, &req.n, NULL, NULL) < 0) {