]> The Tcpdump Group git mirrors - tcpdump/blobdiff - print-radius.c
Have the configure script arrange that the Makefile define _U_
[tcpdump] / print-radius.c
index cf620e86e66c28be1edd93c5ec022219709ab47c..99ae285f5220e2eff326e98acd408bd798fd4745 100644 (file)
@@ -43,8 +43,8 @@
  */
 
 #ifndef lint
-static const char rcsid[] =
-    "$Id: print-radius.c,v 1.18 2002-11-10 20:37:31 guy Exp $";
+static const char rcsid[] _U_ =
+    "$Id: print-radius.c,v 1.21 2003-11-16 09:36:33 guy Exp $";
 #endif
 
 #ifdef HAVE_CONFIG_H
@@ -134,13 +134,13 @@ struct radius_hdr { u_int8_t  code; /* Radius packet code  */
                     u_int8_t  id;   /* Radius packet id    */
                     u_int16_t len;  /* Radius total length */
                     u_int8_t  auth[16]; /* Authenticator   */
-                  } __attribute__((packed));
+                  };
 
 #define MIN_RADIUS_LEN 20
 
 struct radius_attr { u_int8_t type; /* Attribute type   */
                      u_int8_t len;  /* Attribute length */
-                   } __attribute__((packed));
+                   };
 
 
 /* Service-Type Attribute standard values */
@@ -823,7 +823,7 @@ radius_print(const u_char *dat, u_int length)
    }
 
    rad = (struct radius_hdr *)dat;
-   len = ntohs(rad->len);
+   len = EXTRACT_16BITS(&rad->len);
 
    if (len < MIN_RADIUS_LEN)
    {