-
Notifications
You must be signed in to change notification settings - Fork 40
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
Implement userspace tool to display driver status and specify blocklist #53
Conversation
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.
- Use C-style comments. That is,
/* comment */
. - Change Blacklist To Blocklist.
- Minimize the necessary changes. That is, send another pull request(s) for fixing typo.
- Avoid the statement such as
strlen(owl->blacklist) == 0)
. Use!*(owl->blacklist)
instead.
352201b
to
924d9f5
Compare
I've made some changes according to the suggestion above, please take a look when you have time, Thank you! |
924d9f5
to
282b735
Compare
@jserv |
282b735
to
ea22051
Compare
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.
Read https://cbea.ms/git-commit/ carefully and refine your git commit messages.
ea22051
to
a55f88c
Compare
2842a47
to
adc6373
Compare
Sorry I've made a mistake on last modification, the |
b32140f
to
f84e040
Compare
@jserv |
Instead of writing the sentence above (and mentioning me), you can request a code review through the GitHub web interface by selecting the appropriate option. Aim to keep the code review process streamlined and sophisticated, avoiding unnecessary or inefficient language. |
f84e040
to
295fb4b
Compare
295fb4b
to
4e3948f
Compare
4e3948f
to
1829ede
Compare
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.
Read https://cbea.ms/git-commit/ carefully and refine the commit messages.
1829ede
to
c7fc45b
Compare
I just refined git commit message according to https://cbea.ms/git-commit/
|
No, you didn't. Check again. |
An userspace tool vwifi-tool which can display the status of driver and allow users to specify blocklist. According to sysprog21#48, we want a tool which can configure user-specific blocklist to filter unwanted packets from certain interfaces. This tool will show the status of vwifi driver by reading from `/sys/module/vwifi/initstate`, users can only set blocklist for vwifi driver when it's loaded. Users can use vwifi-tool with command line options which is enabled by `getopt()` to set or unset user-specific blocklist pair. The blocklist will be coppied and sent to the vwifi driver via netlink socket. Resolves: sysprog21#48
c7fc45b
to
54b19ec
Compare
Ok, I've refined it again , each line is at most 72 characters and add more detailed explanation. |
Thank @vax-r for contributing. The commit message was amended. |
Summary
Enable ability to use blacklist to block packets from specified interface.
Support blacklist in vwifi kernel module, used as interfaces pair such as "owl2 blocks owl1", allow maximum blacklist size to be 1024 bytes now and maintained as global content within struct owl_content.
Using userspace program to dynamically alter the blacklist maintaining in vwifi kernel module.
Testing
step 1
After mounting vwifi as kernel module in kernel, make sure the ping test works as normal as indicated in README.md.
step 2
compile blacklist_user.c and execute it
After this step, we should have the blacklist loaded into vwifi kernel module.
step 3
Do the ping test again, it should block packets from the interface pair you specefied in
./scripts/blacklist.txt
.You can make the content of
./scripts/blacklist.txt
empty and execute$ ./blacklist_user.o
again, blacklist pairs should be removed then.I think blacklist ability checking can be added as a tesing stage into verify.sh, I would love to help if needed.
Btw I found some type error in verify.sh, and correct "sucess" to "success".
Issue linked
Fix #48