Move restrictions on vendor ID from 32767 to 65535
authorAlan T. DeKok <aland@freeradius.org>
Wed, 12 Aug 2009 08:48:12 +0000 (10:48 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 12 Aug 2009 08:48:12 +0000 (10:48 +0200)
Now that "attr" is stored as an unsigned integer.

Based on a patch from Rafael Ugolini

src/lib/dict.c
src/modules/rlm_eap/types/rlm_eap_ttls/ttls.c

index 262c110..ac28b17 100644 (file)
@@ -421,7 +421,7 @@ int dict_addvendor(const char *name, int value)
        size_t length;
        DICT_VENDOR *dv;
 
-       if (value >= 32767) {
+       if (value > 65535) {
                fr_strerror_printf("dict_addvendor: Cannot handle vendor ID larger than 65535");
                return -1;
        }
index 3f0bad6..e4d8fb6 100644 (file)
@@ -226,8 +226,8 @@ static VALUE_PAIR *diameter2vp(REQUEST *request, SSL *ssl,
                                return NULL;
                        }
 
-                       if (vendor > 32767) {
-                               RDEBUG2("Cannot handle vendor Id greater than 32767");
+                       if (vendor > 65535) {
+                               RDEBUG2("Cannot handle vendor Id greater than 65535");
                                pairfree(&first);
                                return NULL;
                        }