2016-06-07 06:58:31 +00:00
|
|
|
From: Felix Fietkau <nbd@nbd.name>
|
2016-02-07 20:15:21 +00:00
|
|
|
Date: Sun, 7 Feb 2016 21:11:21 +0100
|
|
|
|
Subject: [PATCH] networking/libiproute: fix displaying route table for rules
|
|
|
|
|
|
|
|
r->rtm_table only supports a 8 bit table id, prefer RTA_TABLE if
|
|
|
|
present.
|
|
|
|
|
2016-06-07 06:58:31 +00:00
|
|
|
Signed-off-by: Felix Fietkau <nbd@nbd.name>
|
2016-02-07 20:15:21 +00:00
|
|
|
---
|
|
|
|
|
|
|
|
--- a/networking/libiproute/iprule.c
|
|
|
|
+++ b/networking/libiproute/iprule.c
|
2016-09-18 21:26:26 +00:00
|
|
|
@@ -114,7 +114,9 @@ static int FAST_FUNC print_rule(const st
|
2016-02-07 20:15:21 +00:00
|
|
|
printf("iif %s ", (char*)RTA_DATA(tb[RTA_IIF]));
|
|
|
|
}
|
|
|
|
|
|
|
|
- if (r->rtm_table)
|
|
|
|
+ if (tb[RTA_TABLE])
|
|
|
|
+ printf("lookup %s ", rtnl_rttable_n2a(*(uint32_t*)RTA_DATA(tb[RTA_TABLE])));
|
|
|
|
+ else if (r->rtm_table)
|
|
|
|
printf("lookup %s ", rtnl_rttable_n2a(r->rtm_table));
|
|
|
|
|
|
|
|
if (tb[RTA_FLOW]) {
|