|
|
99be8f |
From b9d228a8c22f1d9069fa0c8f98e6bd94011c5714 Mon Sep 17 00:00:00 2001
|
|
|
99be8f |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
99be8f |
Date: Mon, 29 Apr 2019 20:08:07 +0200
|
|
|
99be8f |
Subject: [PATCH] iplink_vrf: Complain if main table is not found
|
|
|
99be8f |
|
|
|
99be8f |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1465646
|
|
|
99be8f |
Upstream Status: iproute2.git commit 84b6a3f4b5720
|
|
|
99be8f |
|
|
|
99be8f |
commit 84b6a3f4b5720aaf673c2eaad2cf60f786de077b
|
|
|
99be8f |
Author: Phil Sutter <phil@nwl.cc>
|
|
|
99be8f |
Date: Mon Aug 21 18:36:51 2017 +0200
|
|
|
99be8f |
|
|
|
99be8f |
iplink_vrf: Complain if main table is not found
|
|
|
99be8f |
|
|
|
99be8f |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
99be8f |
Acked-by: David Ahern <dsahern@gmail.com>
|
|
|
99be8f |
---
|
|
|
99be8f |
ip/iplink_vrf.c | 4 +++-
|
|
|
99be8f |
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
99be8f |
|
|
|
99be8f |
diff --git a/ip/iplink_vrf.c b/ip/iplink_vrf.c
|
|
|
99be8f |
index 370bb86815a80..9c2de2732a88e 100644
|
|
|
99be8f |
--- a/ip/iplink_vrf.c
|
|
|
99be8f |
+++ b/ip/iplink_vrf.c
|
|
|
99be8f |
@@ -127,7 +127,9 @@ __u32 ipvrf_get_table(const char *name)
|
|
|
99be8f |
if (rtnl_talk_suppress_rtnl_errmsg(&rth, &req.n, &answer) < 0) {
|
|
|
99be8f |
/* special case "default" vrf to be the main table */
|
|
|
99be8f |
if (errno == ENODEV && !strcmp(name, "default"))
|
|
|
99be8f |
- rtnl_rttable_a2n(&tb_id, "main");
|
|
|
99be8f |
+ if (rtnl_rttable_a2n(&tb_id, "main"))
|
|
|
99be8f |
+ fprintf(stderr,
|
|
|
99be8f |
+ "BUG: RTTable \"main\" not found.\n");
|
|
|
99be8f |
|
|
|
99be8f |
return tb_id;
|
|
|
99be8f |
}
|
|
|
99be8f |
--
|
|
|
99be8f |
2.20.1
|
|
|
99be8f |
|