[PATCH 1/2] Add 'ingress' to the list of recognized TC handles.

Andrew Collins bsderandrew at gmail.com
Mon Jun 11 12:44:42 EDT 2012


Currently, rtnl_tc_handle2str understands the ingress handle but
rtnl_tc_str2handle does not.  This change lets rtnl_tc_str2handle
recognize 'ingress' as a valid handle as well.
---
 lib/route/classid.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/lib/route/classid.c b/lib/route/classid.c
index 7b52de8..e1880af 100644
--- a/lib/route/classid.c
+++ b/lib/route/classid.c
@@ -166,6 +166,11 @@ int rtnl_tc_str2handle(const char *str, uint32_t *res)
 		return 0;
 	}
 
+	if (!strcasecmp(str, "ingress")) {
+		*res = TC_H_INGRESS;
+		return 0;
+	}
+
 	h = strtoul(str, &colon, 16);
 
 	/* MAJ is not a number */
-- 
1.7.1




More information about the libnl mailing list