OSSP CVS Repository

ossp - Check-in [4420]
Not logged in
[Honeypot]  [Browse]  [Home]  [Login]  [Reports
[Search]  [Ticket]  [Timeline
  [Patchset]  [Tagging/Branching

Check-in Number: 4420
Date: 2004-Feb-13 22:01:41 (local)
2004-Feb-13 21:01:41 (UTC)
User:rse
Branch:
Comment: remove --with-rfc2518 option and functionality because even the IETF/IESG has finally approved our report about the broken random multicast MAC address generation in the standard (and will fix it in new versions of the draft-mealling-uuid-urn). So, finally get rid of this broken-by-design backward compatibility
Tickets:
#42 MSB of node not set to 1 when using `uuid -v1 -m`
Inspections:
Files:
ossp-pkg/uuid/ChangeLog      1.42 -> 1.43     8 inserted, 0 deleted
ossp-pkg/uuid/uuid.ac      added-> 1.11
ossp-pkg/uuid/uuid.c      1.44 -> 1.45     7 inserted, 67 deleted

ossp-pkg/uuid/ChangeLog 1.42 -> 1.43

--- ChangeLog    2004/02/13 16:17:07     1.42
+++ ChangeLog    2004/02/13 21:01:41     1.43
@@ -13,6 +13,14 @@
 
   Changes between 0.9.6 and 0.9.7 (11-Feb-2004 to 13-Feb-2004)
 
+   o remove --with-rfc2518 option and functionality because
+     even the IETF/IESG has finally approved our report about the broken
+     random multicast MAC address generation in the standard (and
+     will fix it in new versions of the draft-mealling-uuid-urn). So,
+     finally get rid of this broken-by-design backward compatibility
+     functionality.
+     [Ralf S. Engelschall]
+
    o Add support to uuid(1) CLI for decoding from stdin for
      both binary and string representations.
      [Ralf S. Engelschall]


ossp-pkg/uuid/uuid.ac -> 1.11

*** /dev/null    Sat Apr 27 10:22:11 2024
--- -    Sat Apr 27 10:27:06 2024
***************
*** 0 ****
--- 1,88 ----
+ dnl ##
+ dnl ##  OSSP uuid - Universally Unique Identifier
+ dnl ##  Copyright (c) 2004 Ralf S. Engelschall <rse@engelschall.com>
+ dnl ##  Copyright (c) 2004 The OSSP Project <http://www.ossp.org/>
+ dnl ##
+ dnl ##  This file is part of OSSP uuid, a library for the generation
+ dnl ##  of UUIDs which can found at http://www.ossp.org/pkg/lib/uuid/
+ dnl ##
+ dnl ##  Permission to use, copy, modify, and distribute this software for
+ dnl ##  any purpose with or without fee is hereby granted, provided that
+ dnl ##  the above copyright notice and this permission notice appear in all
+ dnl ##  copies.
+ dnl ##
+ dnl ##  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ dnl ##  WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ dnl ##  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ dnl ##  IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR
+ dnl ##  CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ dnl ##  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ dnl ##  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ dnl ##  USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ dnl ##  ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ dnl ##  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ dnl ##  OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ dnl ##  SUCH DAMAGE.
+ dnl ##
+ dnl ##  uuid.ac: UUID specific Autoconf checks
+ dnl ##
+ 
+ dnl #   Check for anything OSSP uuid wants to know
+ dnl #   configure.in:
+ dnl #     UUID_CHECK_ALL
+ 
+ AC_DEFUN(UUID_CHECK_ALL,[
+     dnl #   make sure libnsl and libsocket are linked in if they exist
+     AC_CHECK_LIB(nsl, gethostname)
+     if test ".`echo $LIBS | grep nsl`" = .; then
+         AC_CHECK_LIB(nsl, gethostbyname)
+     fi
+     AC_CHECK_LIB(socket, accept)
+ 
+     dnl #   check for system headers
+     AC_CHECK_HEADERS(sys/types.h sys/param.h sys/time.h sys/socket.h sys/sockio.h sys/ioctl.h)
+     AC_CHECK_HEADERS(netdb.h ifaddrs.h net/if.h net/if_dl.h net/if_arp.h netinet/in.h arpa/inet.h,,,
+ [[
+ #if HAVE_SYS_TYPES_H
+ #include <sys/types.h>
+ #endif
+ #if HAVE_SYS_SOCKET_H
+ #include <sys/socket.h>
+ #endif
+ #if HAVE_SYS_IOCTL_H
+ #include <sys/ioctl.h>
+ #endif
+ ]])
+ 
+     dnl #   check for functions
+     AC_CHECK_FUNCS(getifaddrs nanosleep)
+ 
+     dnl #   check size of built-in types
+     AC_CHECK_TYPES([long long, long double])
+     AC_CHECK_SIZEOF(char, 1)
+     AC_CHECK_SIZEOF(unsigned char, 1)
+     AC_CHECK_SIZEOF(short, 2)
+     AC_CHECK_SIZEOF(unsigned short, 2)
+     AC_CHECK_SIZEOF(int, 4)
+     AC_CHECK_SIZEOF(unsigned int, 4)
+     AC_CHECK_SIZEOF(long, 4)
+     AC_CHECK_SIZEOF(unsigned long, 4)
+     AC_CHECK_SIZEOF(long long, 8)
+     AC_CHECK_SIZEOF(unsigned long long, 8)
+ 
+     dnl #   options
+     AC_ARG_WITH(dce,
+         AC_HELP_STRING([--with-dce], [build DCE 1.1 backward compatibility API]),
+         [ac_cv_with_dce=$withval], [ac_cv_with_dce=no])
+     if test ".$ac_cv_with_dce" = ".yes"; then
+         AC_DEFINE(WITH_DCE, 1, [whether to build DCE 1.1 backward compatibility API])
+         WITH_DCE='yes'
+         DCE_NAME='$(DCE_NAME)'
+     else
+         WITH_DCE='no'
+         DCE_NAME=''
+     fi
+     AC_SUBST(WITH_DCE)
+     AC_SUBST(DCE_NAME)
+ ])
+ 


ossp-pkg/uuid/uuid.c 1.44 -> 1.45

--- uuid.c       2004/01/19 14:56:35     1.44
+++ uuid.c       2004/02/13 21:01:41     1.45
@@ -61,69 +61,9 @@
     Unix UTC base time is January  1, 1970) */
 #define UUID_TIMEOFFSET "01B21DD213814000"
 
-/* IEEE 802 MAC address encoding/decoding bit fields
-
-   ATTENTION:
-
-   In case no real/physical IEEE 802 address is available, both
-   "draft-leach-uuids-guids-01" (section "4. Node IDs when no IEEE 802
-   network card is available") and RFC 2518 (section "6.4.1 Node Field
-   Generation Without the IEEE 802 Address") recommend (quoted from RFC
-   2518):
-
-     "The ideal solution is to obtain a 47 bit cryptographic quality
-     random number, and use it as the low 47 bits of the node ID, with
-     the most significant bit of the first octet of the node ID set to
-     1. This bit is the unicast/multicast bit, which will never be set
-     in IEEE 802 addresses obtained from network cards; hence, there can
-     never be a conflict between UUIDs generated by machines with and
-     without network cards."
-
-   This passage clearly explains the intention to use IEEE 802 multicast
-   addresses. Unfortunately, it incorrectly explains how to implement
-   this! It should instead specify the "*LEAST* significant bit of the
-   first octet of the node ID" as the multicast bit in a memory and
-   hexadecimal string representation of a 48-bit IEEE 802 MAC address.
-
-   Unfortunately, even the reference implementation included in the
-   expired IETF "draft-leach-uuids-guids-01" incorrectly set the
-   multicast bit with an OR bit operation and an incorrect mask of
-   0x80. Hence, several other UUID implementations found on the
-   Internet have inherited this bug.
-
-   Luckily, neither DCE 1.1 nor ISO/IEC 11578:1996 are affected by this
-   problem. They disregard the topic of missing IEEE 802 addresses
-   entirely, and thus avoid adopting this bug from the original draft
-   and code ;-)
-
-   It seems that this standards bug arises from a false interpretation,
-   as the multicast bit is actually the *MOST* significant bit in IEEE
-   802.3 (Ethernet) _transmission order_ of an IEEE 802 MAC address. The
-   authors were likely not aware that the bitwise order of an octet from
-   a MAC address memory and hexadecimal string representation is still
-   always from left (MSB, bit 7) to right (LSB, bit 0).
-
-   For more information, see "Understanding Physical Addresses" in
-   "Ethernet -- The Definitive Guide", p.43, and the section "ETHERNET
-   MULTICAST ADDRESSES" in http://www.iana.org/assignments/ethernet-numbers.
-
-   At OSSP, we do it the intended/correct way and generate a real
-   IEEE 802 multicast address. Those wanting to encode broken IEEE
-   802 MAC addresses (as specified) can nevertheless use a brain dead
-   compile-time option to switch off the correct behavior. When decoding
-   we always use the correct behavior of course. */
-
-/* encoding */
-#ifdef WITH_RFC2518
-#define IEEE_MAC_MCBIT_ENC BM_OCTET(1,0,0,0,0,0,0,0)
-#else
-#define IEEE_MAC_MCBIT_ENC BM_OCTET(0,0,0,0,0,0,0,1)
-#endif
-#define IEEE_MAC_LOBIT_ENC BM_OCTET(0,0,0,0,0,0,1,0)
-
-/* decoding */
-#define IEEE_MAC_MCBIT_DEC BM_OCTET(0,0,0,0,0,0,0,1)
-#define IEEE_MAC_LOBIT_DEC BM_OCTET(0,0,0,0,0,0,1,0)
+/* IEEE 802 MAC address encoding/decoding bit fields */
+#define IEEE_MAC_MCBIT BM_OCTET(0,0,0,0,0,0,0,1)
+#define IEEE_MAC_LOBIT BM_OCTET(0,0,0,0,0,0,1,0)
 
 /* IEEE 802 MAC address octet length */
 #define IEEE_MAC_OCTETS 6
@@ -622,8 +562,8 @@
             (unsigned int)uuid->obj.node[3],
             (unsigned int)uuid->obj.node[4],
             (unsigned int)uuid->obj.node[5],
-            (uuid->obj.node[0] & IEEE_MAC_LOBIT_DEC ? "local" : "global"),
-            (uuid->obj.node[0] & IEEE_MAC_MCBIT_DEC ? "multicast" : "unicast"));
+            (uuid->obj.node[0] & IEEE_MAC_LOBIT ? "local" : "global"),
+            (uuid->obj.node[0] & IEEE_MAC_MCBIT ? "multicast" : "unicast"));
     }
     else {
         /* decode anything else as hexadecimal byte-string only */
@@ -843,8 +783,8 @@
     if ((mode & UUID_MAKE_MC) || (uuid->mac[0] & BM_OCTET(1,0,0,0,0,0,0,0))) {
         /* generate random IEEE 802 local multicast MAC address */
         prng_data(uuid->prng, (void *)&(uuid->obj.node), sizeof(uuid->obj.node));
-        uuid->obj.node[0] |= IEEE_MAC_MCBIT_ENC;
-        uuid->obj.node[0] |= IEEE_MAC_LOBIT_ENC;
+        uuid->obj.node[0] |= IEEE_MAC_MCBIT;
+        uuid->obj.node[0] |= IEEE_MAC_LOBIT;
     }
     else {
         /* use real regular MAC address */

CVSTrac 2.0.1