-/* MAXBUFSIZE is the maximum size of a request: enough for a MAXSIZEd packet or a 8192 bits RSA key */
-#define MAXBUFSIZE ((MAXSIZE > 2048 ? MAXSIZE : 2048) + 128)
+/* MAXSIZE is the maximum size of an encapsulated packet */
+#define MAXSIZE (MTU + 64)
+
+/* MAXBUFSIZE is the maximum size of a request: enough for a base64 encoded MAXSIZEd packet plus request header */
+#define MAXBUFSIZE ((MAXSIZE * 8) / 6 + 128)