diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-02-07 20:15:21 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-02-07 20:15:21 +0000 |
commit | faaeacd89dd0d87561fe6ec93bc97a2590efe7e2 (patch) | |
tree | 9b409afa72b75bfa9dd62d893e6b3282d85cb096 | |
parent | f67cdec344c847b3451e66dcff12555975f49953 (diff) | |
download | master-187ad058-faaeacd89dd0d87561fe6ec93bc97a2590efe7e2.tar.gz master-187ad058-faaeacd89dd0d87561fe6ec93bc97a2590efe7e2.tar.bz2 master-187ad058-faaeacd89dd0d87561fe6ec93bc97a2590efe7e2.zip |
busybox: fix route tables in ip rule show output
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@48649 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r-- | package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch b/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch new file mode 100644 index 0000000000..1e153ea918 --- /dev/null +++ b/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch @@ -0,0 +1,23 @@ +From: Felix Fietkau <nbd@openwrt.org> +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. + +Signed-off-by: Felix Fietkau <nbd@openwrt.org> +--- + +--- a/networking/libiproute/iprule.c ++++ b/networking/libiproute/iprule.c +@@ -119,7 +119,9 @@ static int FAST_FUNC print_rule(const st + 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]) { |