Gnutella Forums  

Go Back   Gnutella Forums > Current Gnutella Client Forums > LimeWire+WireShare (Cross-platform) > New Feature Requests
Register FAQ The Twelve Commandments Members List Calendar Arcade Find the Best VPN Today's Posts

New Feature Requests Your idea for a cool new feature. Or, a LimeWire annoyance that has to get changed.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old July 28th, 2003
Novicius
 
Join Date: July 26th, 2003
Posts: 3
shamino is flying high
Default Prefix/mask syntax for host filtering

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);
2) Match target address against prefix/mask pair:
Code:
if ((target & mask) == (prefix & mask))
{
    /* address matches */
}
Reply With Quote
  #2 (permalink)  
Old July 28th, 2003
Software Developer
 
Join Date: November 4th, 2002
Location: New York
Posts: 1,366
sberlin is flying high
Default

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.
Reply With Quote
  #3 (permalink)  
Old July 28th, 2003
Novicius
 
Join Date: July 26th, 2003
Posts: 3
shamino is flying high
Default

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.
Reply With Quote
  #4 (permalink)  
Old July 29th, 2003
Software Developer
 
Join Date: November 4th, 2002
Location: New York
Posts: 1,366
sberlin is flying high
Default

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.
Reply With Quote
  #5 (permalink)  
Old July 29th, 2003
Software Developer
 
Join Date: November 4th, 2002
Location: New York
Posts: 1,366
sberlin is flying high
Default

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.
Reply With Quote
  #6 (permalink)  
Old July 29th, 2003
Novicius
 
Join Date: July 26th, 2003
Posts: 3
shamino is flying high
Default

Thanks a lot. I'll look for it when the next version(s) come out.
Reply With Quote
  #7 (permalink)  
Old July 29th, 2003
Software Developer
 
Join Date: November 4th, 2002
Location: New York
Posts: 1,366
sberlin is flying high
Default

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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
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


All times are GMT -7. The time now is 08:56 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 ©2011, Crawlability, Inc.

Copyright © 2020 Gnutella Forums.
All Rights Reserved.