diff options
author | Phil Sutter <phil@nwl.cc> | 2017-08-21 18:36:51 +0200 |
---|---|---|
committer | Stephen Hemminger <stephen@networkplumber.org> | 2017-08-21 17:28:03 -0700 |
commit | 84b6a3f4b5720aaf673c2eaad2cf60f786de077b (patch) | |
tree | cd3dc89bee6ad072a2e6ebfb4e9fc4aa7404adcb /ip | |
parent | 7c66d89828a6ee4c5a4e3f48ef4a4cb07b50013d (diff) | |
download | platform_external_iproute2-84b6a3f4b5720aaf673c2eaad2cf60f786de077b.tar.gz platform_external_iproute2-84b6a3f4b5720aaf673c2eaad2cf60f786de077b.tar.bz2 platform_external_iproute2-84b6a3f4b5720aaf673c2eaad2cf60f786de077b.zip |
iplink_vrf: Complain if main table is not found
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: David Ahern <dsahern@gmail.com>
Diffstat (limited to 'ip')
-rw-r--r-- | ip/iplink_vrf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ip/iplink_vrf.c b/ip/iplink_vrf.c index 917630e8..2b85a3a5 100644 --- a/ip/iplink_vrf.c +++ b/ip/iplink_vrf.c @@ -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; } |