diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2012-12-18 09:18:15 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2012-12-18 09:18:15 +0100 |
commit | 5d2dd9d7581b5e2382580151ca53c835ee02abd9 (patch) | |
tree | e1deb0e089b0020f878b8fe0f4868d736ff6ba90 | |
parent | 405313c39dbf75636787ba75659235fc9f179a4f (diff) | |
download | rsyslog-5d2dd9d7581b5e2382580151ca53c835ee02abd9.tar.gz rsyslog-5d2dd9d7581b5e2382580151ca53c835ee02abd9.tar.bz2 rsyslog-5d2dd9d7581b5e2382580151ca53c835ee02abd9.zip |
omudpspoof: add action parameter for mtu size
-rw-r--r-- | doc/omfwd.html | 2 | ||||
-rw-r--r-- | plugins/omudpspoof/omudpspoof.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/doc/omfwd.html b/doc/omfwd.html index 5599ae39..fb9145e1 100644 --- a/doc/omfwd.html +++ b/doc/omfwd.html @@ -16,7 +16,7 @@ <p><b>Global Configuration Directives</b>:</p> <ul> <li><strong>Template </strong>[templateName]<br> - sets a new default template for file actions.<br></li> + sets a non-standard default template for this module.<br></li> </ul> <p> </p> diff --git a/plugins/omudpspoof/omudpspoof.c b/plugins/omudpspoof/omudpspoof.c index c041eec5..a9c48351 100644 --- a/plugins/omudpspoof/omudpspoof.c +++ b/plugins/omudpspoof/omudpspoof.c @@ -310,7 +310,7 @@ ENDfreeCnf BEGINcreateInstance CODESTARTcreateInstance -finalize_it: + pData->mtu = 1500; ENDcreateInstance @@ -338,7 +338,6 @@ CODESTARTdbgPrintInstInfo ENDdbgPrintInstInfo -#define MTU 1500 /* min max MTU we support - 1500 for ethernet TODO: config option? */ /* Send a message via UDP * Note: libnet is not thread-safe, so we need to ensure that only one * instance ever is calling libnet code. @@ -395,7 +394,7 @@ if(pData->libnet_handle == NULL) { for (r = pData->f_addr; r && bSendSuccess == RSFALSE ; r = r->ai_next) { tempaddr = (struct sockaddr_in *)r->ai_addr; /* Getting max payload size (must be multiple of 8) */ - maxPktLen = (MTU - LIBNET_IPV4_H) & ~0x07; + maxPktLen = (pData->mtu - LIBNET_IPV4_H) & ~0x07; msgOffs = 0; /* We're doing (payload size - UDP header size) and not * checking if it's a multiple of 8 because we know the |