Author: nbd
Date: 2016-02-07 21:15:21 +0100 (Sun, 07 Feb 2016)
New Revision: 48649

Added:
   
trunk/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch
Log:
busybox: fix route tables in ip rule show output

Signed-off-by: Felix Fietkau <[email protected]>

Added: 
trunk/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch
===================================================================
--- 
trunk/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch
                          (rev 0)
+++ 
trunk/package/utils/busybox/patches/020-networking-libiproute-fix-displaying-route-table-for.patch
  2016-02-07 20:15:21 UTC (rev 48649)
@@ -0,0 +1,23 @@
+From: Felix Fietkau <[email protected]>
+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 <[email protected]>
+---
+
+--- 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]) {
_______________________________________________
openwrt-commits mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-commits

Reply via email to