From 84b6a3f4b5720aaf673c2eaad2cf60f786de077b Mon Sep 17 00:00:00 2001 From: Phil Sutter Date: Mon, 21 Aug 2017 18:36:51 +0200 Subject: [PATCH] iplink_vrf: Complain if main table is not found Signed-off-by: Phil Sutter Acked-by: David Ahern --- ip/iplink_vrf.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; }