![]() |
|
Register | FAQ | The Twelve Commandments | Members List | Calendar | Arcade | Find the Best VPN | Today's Posts | Search |
New Feature Requests Your idea for a cool new feature. Or, a LimeWire annoyance that has to get changed. |
![]() |
| LinkBack ![]() | Thread Tools ![]() | Display Modes ![]() |
|
| |||
![]() Currently, I can apply block/allow filters only if the masks are aligned on an 8-bit boundary. For example: 10.11.12.13, 10.11.12.*, 10.11.*.*, 10.*.*.*, etc. There is a problem with this, however. Some networks that I want to block don't have an entire 8-, 16-, or 24-bit address space assigned to them. They have some other amount. For instance, suppose someone has a 4-bit network numbered 10.11.12.16 through 10.11.12.31. Right now, I have to manually add all 16 host addresses. I would prefer to be able to specify the mask (10.11.12.16/255.255.255.240) or even better, the prefix-length (10.11.12.16/28). The problem is annoying with small networks (like the 4-bit network in my example) but it is a showstopper if it involves bigger networks (like a 7-bit network - there's no way I'm going to hand-enter 128 host addresses.) I browsed through this forum and the documentation, but I didn't find any indication that the current release supports this feature, nor have I seen any prior requests for it. Hopefully, this won't be difficult to implement. The algorithm for doing this is really simple. Assuming that you've got your IP address stored in a 32-bit integer in host order, the algorithm is: 1) generate a mask from the prefix length: Code: mask = 0xFFFFFFFFu << (32 - prefixlen); Code: if ((target & mask) == (prefix & mask)) { /* address matches */ } |
| |||
![]() I believe we do support both masks and prefix-lengths. I know our filtering code supports it, at least. I'm not exactly positive the GUI input screen will accept it, but I see no reason why it wouldn't. If you're interested in the code that does it, you can view it here: http://core.limewire.org/source/brow...-cvsweb-markup Thanks. |
| |||
![]() http://core.limewire.org/source/brow...-cvsweb-markup Thanks for the pointer. The code seems to already do what I want. I hadn't actually tried it, because the documentation and the preferences dialog didn't mention that form as a possibility. So assuming we're both right, then the only real issue is one of documentation. Now all I have to do is figure out how to test this. Unfortunately, the preferences dialog seems to accept everything - even obviously bogus addresses like 10.1.1.527, so I can't simply enter it and assume it's OK if I don't get an error. |
| |||
![]() Yeah, I noticed the other night when I was looking through the code (prior to pasting the link) that IP would accept some pretty bogus addresses. Fortunately, it's no big deal, because all it's used for is blacklisting/whitelisting based on user-entered addresses. I'll see if I can't make it a little more robust though, and add some feedback into the preferences dialog. |
| |||
![]() FYI, I just added better validation for IPs & documentation in the preferences dialog for masks and the simplified prefix-lengths. I don't believe the next version will contain it, but the one immediately afterwards will. Thanks. |
| |||
![]() The validation made it into 3.4.1 (the latest beta), however the documentation changes won't be around until 3.5 is released. Basically this means that enterring invalid IP addresses in the whitelist/blacklist area will beep and erase the invalid address. Try and break it. ![]() |
![]() |
| |
![]() | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Filtering file types??? How to get more options for filtering!!!? | BugzinTexas | LimeWire+WireShare Tips and Tricks | 12 | January 18th, 2008 04:03 AM |
Can't connect while behind IP mask | leukoplast | Connection Problems | 0 | August 30th, 2006 12:10 AM |
filtering searches by keywords when using the "Browse Host" feature | midnight_blue | New Feature Requests | 0 | June 26th, 2006 10:17 AM |
Filter Hosts needs host mask or subnet filter ability | Unregistered | New Feature Requests | 0 | March 6th, 2002 10:48 AM |