_AC_DEFINE_QUOTED_AND_SUBST([DEFAULT_NETWORK_CONTROL_BIND_ADDRESS], [0.0.0.0])
_AC_DEFINE_QUOTED_AND_SUBST([DEFAULT_NETWORK_DATA_BIND_ADDRESS], [0.0.0.0])
_AC_DEFINE_QUOTED_AND_SUBST([DEFAULT_NETWORK_VIEWER_BIND_ADDRESS], [localhost])
+_AC_DEFINE_AND_SUBST([DEFAULT_NETWORK_RELAYD_CTRL_MAX_PAYLOAD_SIZE], [134217728])
_AC_DEFINE_AND_SUBST([DEFAULT_ROTATE_PENDING_RELAY_TIMER], [200000])
# Command short descriptions
size_ret = write_padding_to_file(metadata_stream->stream_fd->fd,
metadata_payload_header.padding_size);
- if (size_ret < 0) {
+ if (size_ret < (int64_t) metadata_payload_header.padding_size) {
ret = -1;
goto end_put;
}
conn->sock->fd, header.cmd, header.cmd_version,
header.data_size);
- /* FIXME temporary arbitrary limit on data size. */
- if (header.data_size > (128 * 1024 * 1024)) {
+ if (header.data_size > DEFAULT_NETWORK_RELAYD_CTRL_MAX_PAYLOAD_SIZE) {
ERR("Command header indicates a payload (%" PRIu64 " bytes) that exceeds the maximal payload size allowed on a control connection.",
header.data_size);
ret = -1;
*/
#define DEFAULT_INET_TCP_TIMEOUT 180 /* sec */
+/* Maximum payload size for a control connection */
+
+#define DEFAULT_NETWORK_RELAYD_CTRL_MAX_PAYLOAD_SIZE CONFIG_DEFAULT_NETWORK_RELAYD_CTRL_MAX_PAYLOAD_SIZE
+
/*
* Default receiving and sending timeout for an application socket.
*/