{
int sock, res=0, error;
struct addrinfo *result, *rp, hints;
- char port_str[MAX_PORT_STR_LEN];
+ char port_str[MAX_PORT_STR_LEN+1];
if (options->test)
{
hints.ai_protocol = IPPROTO_TCP;
}
- snprintf(port_str, MAX_PORT_STR_LEN, "%d", options->spa_dst_port);
+ snprintf(port_str, MAX_PORT_STR_LEN+1, "%d", options->spa_dst_port);
error = getaddrinfo(options->spa_server_str, port_str, &hints, &result);
*
*****************************************************************************
*/
+#include "fwknop_common.h"
#include "utils.h"
/* Generic hex dump function.
#define DEFAULT_NAT_PORT 55000
#define MIN_HIGH_PORT 10000 /* sensible minimum for SPA dest port */
#define MAX_PORT 65535
-#define MAX_PORT_STR_LEN 6
-#define MAX_PROTO_STR_LEN 6
#define MAX_SERVER_STR_LEN 50
#define MAX_LINE_LEN 1024