aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Author Topic: padded filter lists  (Read 2493 times)

stoatwblr

  • Sr. Member
  • ****
  • Karma: 12
  • Offline Offline
  • Posts: 318
padded filter lists
« on: April 18, 2010, 06:15:56 AM »

Hopefully this isn't a bug, or has been addressed previously.

I've noticed that some IP filter lists are zero-padded and some aren't.

While the RFCs are very clear that IP addresses are decimal a lot of parsers and standard libraries are broken and treat leading 0's as OCTAL

End result: the IP written down isn't the IP the machine uses.

I can't see how to get a dump of filtered IPs out of a running amule to double check this. Has anyone verified that what goes in is what comes out?

Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: padded filter lists
« Reply #1 on: April 18, 2010, 02:15:53 PM »

IPs from the IP filter list are parsed with StringIPtoUint32 from NetworkFunctions.cpp which doesn't use any octal folly.
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

stoatwblr

  • Sr. Member
  • ****
  • Karma: 12
  • Offline Offline
  • Posts: 318
Re: padded filter lists
« Reply #2 on: April 18, 2010, 04:37:55 PM »

IPs from the IP filter list are parsed with StringIPtoUint32 from NetworkFunctions.cpp which doesn't use any octal folly.

Great to hear. The octal issue has been the cause of a lot of pain over the years (and it's still there in Bind).



Logged