iplink_vrf: Complain if main table is not found
Signed-off-by: Phil Sutter <phil@nwl.cc> Acked-by: David Ahern <dsahern@gmail.com>
This commit is contained in:
parent
7c66d89828
commit
84b6a3f4b5
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue