mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-21 10:10:42 +01:00
omudpspoof: add action parameter for mtu size
This commit is contained in:
parent
405313c39d
commit
5d2dd9d758
@ -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>
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user