offbynull / portmapper

Java library that maps ports on NAT-enabled routers (supported protocols: UPnP-IGD/NAT-PMP/PCP).
Apache License 2.0
88 stars 15 forks source link

RegexUtils.findAllIpv4Addresses does not find gateway properly #7

Closed icaliskanoglu closed 8 years ago

icaliskanoglu commented 8 years ago

my gateway ip is 10.6.0.254 but expression matches 10.6.0.2

icaliskanoglu commented 8 years ago

i find this regexp. this works fine for me. may be you can use it.

"(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}"

offbynull commented 8 years ago

Hi. Thank you for the bug report.

I'll look in to this on the weekend and hopefully deploy a fixed version soon.

offbynull commented 8 years ago

I've committed a change that should fix this. Please take a look if you have a moment to spare.

I'll publish a new version with this fix sometime this month.

offbynull commented 8 years ago

Closing the ticket. This change won't be released until 2.0.

offbynull commented 8 years ago

Re-opening as a reminder to test.

offbynull commented 8 years ago

Tested and works.