From: Phil Sutter Date: Mon, 21 Aug 2017 16:36:51 +0000 (+0200) Subject: iplink_vrf: Complain if main table is not found X-Git-Tag: v4.13.0~39 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84b6a3f4b5720aaf673c2eaad2cf60f786de077b;p=thirdparty%2Fiproute2.git iplink_vrf: Complain if main table is not found Signed-off-by: Phil Sutter Acked-by: David Ahern --- diff --git a/ip/iplink_vrf.c b/ip/iplink_vrf.c index 917630e85..2b85a3a56 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; }