diff --git a/src/probe_modules/module_udp.c b/src/probe_modules/module_udp.c index aaa6151..1f3be62 100644 --- a/src/probe_modules/module_udp.c +++ b/src/probe_modules/module_udp.c @@ -50,6 +50,8 @@ int udp_global_initialize(struct state_conf * zconf) { return(0); args = strdup(zconf->probe_args); + if (! args) exit(1) + c = strchr(args, ':'); if (! c) { fprintf(stderr, "error: unknown UDP probe specification (expected file:/path, text:STRING, or hex:01020304)\n"); @@ -96,6 +98,11 @@ int udp_global_initialize(struct state_conf * zconf) { exit(1); } + if (udp_send_msg_len > 1472) { + fprintf(stderr, "warning: reducing UDP payload to 1472 bytes (from %d) to fit on the wire\n", udp_send_msg_len); + udp_send_msg_len = 1472; + } + free(args); return(0); }