structs require alignment. But packets can come from anywhere,
and aren't always aligned.
/*
* End of variable length bits, do basic check now to see if packet looks long enough
*/
- len = (p - data) + sizeof(udp_header_t) + sizeof(radius_packet_t); /* length value */
+ len = (p - data) + sizeof(udp_header_t) + RADIUS_HEADER_LENGTH; /* length value */
if ((size_t) len > header->caplen) {
REDEBUG("Packet too small, we require at least %zu bytes, captured %i bytes",
(size_t) len, header->caplen);
uint64_t type[FR_RADIUS_CODE_MAX+ 1];
} rs_counters_t;
-typedef struct CC_HINT(__packed__) {
- uint8_t code;
- uint8_t id;
- uint8_t length[2];
- uint8_t vector[RADIUS_AUTH_VECTOR_LENGTH];
- uint8_t data[];
-} radius_packet_t;
-
/** Stats for a single interval
*
* And interval is defined as the time between a call to the stats output function.
#include <fcntl.h>
-typedef struct {
- uint8_t code;
- uint8_t id;
- uint8_t length[2];
- uint8_t vector[RADIUS_AUTH_VECTOR_LENGTH];
- uint8_t data[1];
-} radius_packet_t;
-
-
/*
* Some messages get printed out only in debugging mode.
*/