No need to print this in iptables CLASSIFY target format,
eg. 0004:1230, this is innecessarily large.

And always print major and minor numbers.

Signed-off-by: Pablo Neira Ayuso <pa...@netfilter.org>
---
 src/meta.c | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/src/meta.c b/src/meta.c
index c7967b0..1b17819 100644
--- a/src/meta.c
+++ b/src/meta.c
@@ -80,14 +80,7 @@ static void tchandle_type_print(const struct expr *expr)
                printf("none");
                break;
        default:
-               if (TC_H_MAJ(handle) == 0)
-                       printf(":%04x", TC_H_MIN(handle));
-               else if (TC_H_MIN(handle) == 0)
-                       printf("%04x:", TC_H_MAJ(handle) >> 16);
-               else {
-                       printf("%04x:%04x",
-                              TC_H_MAJ(handle) >> 16, TC_H_MIN(handle));
-               }
+               printf("%0x:%0x", TC_H_MAJ(handle) >> 16, TC_H_MIN(handle));
                break;
        }
 }
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to