summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Collins <bsderandrew@gmail.com>2012-06-11 10:44:42 -0600
committerThomas Graf <tgraf@redhat.com>2012-06-11 23:50:21 +0200
commit3c532654014ae8f7ea91288281e8879aee1ac786 (patch)
tree47fa51bd305ad12469f7495be9357f00191f75fc
parentffa461d37c97791f2c4f84682cfd241beb2448c0 (diff)
downloadlibnl-3c532654014ae8f7ea91288281e8879aee1ac786.tar.gz
Add 'ingress' to the list of recognized TC handles.
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.
-rw-r--r--lib/route/classid.c5
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 */