diff options
Diffstat (limited to 'plugins/omudpspoof/omudpspoof.c')
-rw-r--r-- | plugins/omudpspoof/omudpspoof.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/plugins/omudpspoof/omudpspoof.c b/plugins/omudpspoof/omudpspoof.c index 531a0dcf..d2c5364c 100644 --- a/plugins/omudpspoof/omudpspoof.c +++ b/plugins/omudpspoof/omudpspoof.c @@ -337,6 +337,12 @@ UDPSend(instanceData *pData, uchar *pszSourcename, char *msg, size_t len) CHKiRet(doTryResume(pData)); } + if(len > 1472) { + DBGPRINTF("omudpspoof: msg with length %d truncated to 1472 bytes: '%.768s'\n", + len, msg); + len = 1472; + } + ip = ipo = udp = 0; if(pData->sourcePort++ >= pData->sourcePortEnd){ pData->sourcePort = pData->sourcePortStart; @@ -385,7 +391,7 @@ UDPSend(instanceData *pData, uchar *pszSourcename, char *msg, size_t len) /* Write it to the wire. */ lsent = libnet_write(libnet_handle); if (lsent == -1) { - DBGPRINTF("Write error: %s\n", libnet_geterror(libnet_handle)); + DBGPRINTF("omudpspoof: write error: %s\n", libnet_geterror(libnet_handle)); } else { bSendSuccess = RSTRUE; break; |