[GeoNetwork-users] trunk and IPv6

Hi

I am having some errors with geonetwork trunk and IPv6

On access from my localbox, I get

java.lang.NumberFormatException: For input string: "fe80:0:0:0:8d42:8279:40eb:f90f"
      at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
      at java.lang.Integer.parseInt(Integer.java:449)
      at java.lang.Integer.parseInt(Integer.java:499)
      at org.fao.geonet.kernel.AccessManager.getAddress(AccessManager.java:418)
      at org.fao.geonet.kernel.AccessManager.isIntranet(AccessManager.java:401)
      at org.fao.geonet.kernel.AccessManager.getUserGroups(AccessManager.java:203)
      at org.fao.geonet.guiservices.metadata.GetLatestUpdated.exec(GetLatestUpdated.java:80)

This is the machines IPv6 address, which don't be handled by the method private long getAddress(String ip) in AccessManager.

Do you have any suggestions?

Terry

hi Terry,

thanks, it seems clear we must adapt that method to deal with IPv6.

Can someone confirm that for IPv6, we should determine whether an IP address
is "internal" using this specification http://tools.ietf.org/html/rfc4193 ?

Kind regards
Heikki Doeleman

On Mon, Jun 14, 2010 at 8:49 AM, <Terry.Rankine@anonymised.com> wrote:

Hi

I am having some errors with geonetwork trunk and IPv6

On access from my localbox, I get

java.lang.NumberFormatException: For input string:
"fe80:0:0:0:8d42:8279:40eb:f90f"
     at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
     at java.lang.Integer.parseInt(Integer.java:449)
     at java.lang.Integer.parseInt(Integer.java:499)
     at
org.fao.geonet.kernel.AccessManager.getAddress(AccessManager.java:418)
     at
org.fao.geonet.kernel.AccessManager.isIntranet(AccessManager.java:401)
     at
org.fao.geonet.kernel.AccessManager.getUserGroups(AccessManager.java:203)
     at
org.fao.geonet.guiservices.metadata.GetLatestUpdated.exec(GetLatestUpdated.java:80)

This is the machines IPv6 address, which don't be handled by the method
private long getAddress(String ip) in AccessManager.

Do you have any suggestions?

Terry

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork

hi Terry,

I have committed a fix in trunk that should deal with both IPv4 and IPv6
addresses.

If it turns out this is not complete, we'll extend the fix, but as far as I
can tell it should be correct and for you, solve your problem.

Please note that since very recently, GeoNetwork trunk has moved to a maven
build. To build it you need to install maven, and run "mvn clean install".
For the moment, no executable installer is built, the result of the maven
build is a war file.

Hope this helps,

Kind regards
Heikki Doeleman

On Mon, Jun 14, 2010 at 9:57 AM, heikki <tropicano@anonymised.com> wrote:

hi Terry,

thanks, it seems clear we must adapt that method to deal with IPv6.

Can someone confirm that for IPv6, we should determine whether an IP
address is "internal" using this specification
http://tools.ietf.org/html/rfc4193 ?

Kind regards
Heikki Doeleman

On Mon, Jun 14, 2010 at 8:49 AM, <Terry.Rankine@anonymised.com> wrote:

Hi

I am having some errors with geonetwork trunk and IPv6

On access from my localbox, I get

java.lang.NumberFormatException: For input string:
"fe80:0:0:0:8d42:8279:40eb:f90f"
     at
java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
     at java.lang.Integer.parseInt(Integer.java:449)
     at java.lang.Integer.parseInt(Integer.java:499)
     at
org.fao.geonet.kernel.AccessManager.getAddress(AccessManager.java:418)
     at
org.fao.geonet.kernel.AccessManager.isIntranet(AccessManager.java:401)
     at
org.fao.geonet.kernel.AccessManager.getUserGroups(AccessManager.java:203)
     at
org.fao.geonet.guiservices.metadata.GetLatestUpdated.exec(GetLatestUpdated.java:80)

This is the machines IPv6 address, which don't be handled by the method
private long getAddress(String ip) in AccessManager.

Do you have any suggestions?

Terry

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the
lucky parental unit. See the prize list and enter to win:
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
GeoNetwork-users mailing list
GeoNetwork-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geonetwork-users
GeoNetwork OpenSource is maintained at
http://sourceforge.net/projects/geonetwork