From: Alan T. DeKok Date: Tue, 16 Feb 2016 16:42:18 +0000 (-0500) Subject: move MAX_PACKET_LEN to common header X-Git-Tag: release_3_0_12~226 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b087f60f4d78fbfaf58e12bdf140c73b7597e75;p=thirdparty%2Ffreeradius-server.git move MAX_PACKET_LEN to common header --- diff --git a/src/include/radius.h b/src/include/radius.h index 10a7d940e83..7001b12577c 100644 --- a/src/include/radius.h +++ b/src/include/radius.h @@ -72,6 +72,11 @@ typedef enum { #define PW_RADIUS_TLS_PORT 2083 #define PW_COA_UDP_PORT 3799 +/* + * The RFC says 4096 octets max, and most packets are less than 256. + */ +#define MAX_PACKET_LEN 4096 + #include #include #include diff --git a/src/lib/radius.c b/src/lib/radius.c index b17c868790c..53d45e2885d 100644 --- a/src/lib/radius.c +++ b/src/lib/radius.c @@ -64,11 +64,6 @@ static void VP_HEXDUMP(char const *msg, uint8_t const *data, size_t len) #endif -/* - * The RFC says 4096 octets max, and most packets are less than 256. - */ -#define MAX_PACKET_LEN 4096 - /* * The maximum number of attributes which we allow in an incoming * request. If there are more attributes than this, the request diff --git a/src/lib/tcp.c b/src/lib/tcp.c index 3c6ac35aa9a..355277c70dc 100644 --- a/src/lib/tcp.c +++ b/src/lib/tcp.c @@ -26,9 +26,6 @@ RCSID("$Id$") #ifdef WITH_TCP -/* FIXME: into common RADIUS header? */ -#define MAX_PACKET_LEN 4096 - RADIUS_PACKET *fr_tcp_recv(int sockfd, int flags) { RADIUS_PACKET *packet = rad_alloc(NULL, false);