]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
iplink_vrf: Complain if main table is not found
authorPhil Sutter <phil@nwl.cc>
Mon, 21 Aug 2017 16:36:51 +0000 (18:36 +0200)
committerStephen Hemminger <stephen@networkplumber.org>
Tue, 22 Aug 2017 00:28:03 +0000 (17:28 -0700)
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: David Ahern <dsahern@gmail.com>
ip/iplink_vrf.c

index 917630e8533758a62d8566cd877388c3101d5529..2b85a3a56eb70016e833f4ef4dbfce70295f1dc5 100644 (file)
@@ -131,7 +131,9 @@ __u32 ipvrf_get_table(const char *name)
                                           &answer.n, sizeof(answer)) < 0) {
                /* special case "default" vrf to be the main table */
                if (errno == ENODEV && !strcmp(name, "default"))
-                       rtnl_rttable_a2n(&tb_id, "main");
+                       if (rtnl_rttable_a2n(&tb_id, "main"))
+                               fprintf(stderr,
+                                       "BUG: RTTable \"main\" not found.\n");
 
                return tb_id;
        }