From: Phil Sutter <phil@nwl.cc>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org
Subject: [iproute PATCH v2 2/3] iplink_vrf: Complain if main table is not found
Date: Mon, 21 Aug 2017 18:36:51 +0200 [thread overview]
Message-ID: <20170821163652.23752-3-phil@nwl.cc> (raw)
In-Reply-To: <20170821163652.23752-1-phil@nwl.cc>
Signed-off-by: Phil Sutter <phil@nwl.cc>
Acked-by: David Ahern <dsahern@gmail.com>
---
Changes since v1:
- Remove double newline addon.
- Added David's ACK from v1 review.
---
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 917630e853375..2b85a3a56eb70 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;
}
--
2.13.1
next prev parent reply other threads:[~2017-08-21 16:37 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-21 16:36 [iproute PATCH v2 0/3] Covscan: Fix for missing error checking Phil Sutter
2017-08-21 16:36 ` [iproute PATCH v2 1/3] iproute: Check mark value input Phil Sutter
2017-08-21 16:36 ` Phil Sutter [this message]
2017-08-21 16:36 ` [iproute PATCH v2 3/3] devlink: Check return code of strslashrsplit() Phil Sutter
2017-08-22 0:29 ` [iproute PATCH v2 0/3] Covscan: Fix for missing error checking Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170821163652.23752-3-phil@nwl.cc \
--to=phil@nwl.cc \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).