-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix hexadecimal qdisc/class id matching #3
Conversation
Thanks for your pull request. t looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). 📝 Please visit https://cla.developers.google.com/ to sign. Once you've signed (or fixed any issues), please reply here (e.g. What to do if you already signed the CLAIndividual signers
Corporate signers
|
Hello Marcel, thank you very much for the contribution and for finding this embarrassing bug ;) I think we will also need to update some tests. Sadly this was one of my older repositories and I didn't have continuous testing enabled. I have added that now and the Travis-CI output should indicate which tests need to be updated. The tests will also help us by ensuring that the fix actually fixes the issue. I am sure you have tested it locally, however tests will give us the guarantee going forward. Secondly since this is Google-owned code I will ask you to sign the CLA (see the comment from the googlebot) first. Please respond on the pull request once the above checks are all green (CLA signed and tests passing). Again thanks for your time and help! |
Fixes #4 |
Ids from tc are parsed hexadecimal where as tc names in config user rules are parsed as regular integers.
668a9d3
to
e70f55a
Compare
CLAs look good, thanks! |
All done, test pass, have a nice weekend! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much Marcel.
First thanks for this useful piece of code, got it up and running quite easily. But I've hit some minor obstacles while configuring my "user" rules. I have some tc classes that are reported by tc like this:
So I thought the following config would work
But I did not see these classes in the returned
tcUserNameLeaf
. Debugged the issue down (first time doing something in go) and found that results from tc are parsed viastrconv.ParseInt(matchSlice[2], 16, 32)
and the derived tc name is done viastrconv.FormatInt(classHandle, 10)
, therefore not matching the configuration (eg.1:80
become1:128
). This PR is of course a breaking change, but I guess nobody else has hit this so far or he/she should probably have reported it already (and I don't think this was intentional).