[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: UUIDGenerator broken on Windows...

timfox do-not-reply at jboss.com
Wed Feb 4 04:01:19 EST 2009


Looking a the code I can seem a few potential issues:

1) The return value of getHardwareAddress() is assumed to be four bytes - I don't think that is a correct assumption.

Mac addresses are at least 48 bits. http://en.wikipedia.org/wiki/MAC_address
Also it's not guaranteed that a MAC address will be returned - it could be some other kind of addressing scheme.

2) The return value of InetAddress.getAddress() is also assumed to be four bytes. This will not be true for ipv6. No ipv6 check is done.

IPv6 addresses are 128 bits, IPv4 addresses are 32 bits. http://en.wikipedia.org/wiki/IPv6

We need an IPV4 address.

Looks like the code needs some more checking to be added.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4206826#4206826

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4206826



More information about the jboss-dev-forums mailing list