summaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2012-06-15 16:10:32 +0200
committerRainer Gerhards <rgerhards@adiscon.com>2012-06-15 16:10:32 +0200
commit8985d50fea62e1794c8e1a12d09733007869a6b4 (patch)
treecdf842e4d51cd7cfbd4d1fbe635326781817aa1f /plugins
parent0620fc5780fabdfb160524197fd4aa6bb22613e9 (diff)
parent33acb956db2824a118656021d873143ff1475321 (diff)
downloadrsyslog-8985d50fea62e1794c8e1a12d09733007869a6b4.tar.gz
rsyslog-8985d50fea62e1794c8e1a12d09733007869a6b4.tar.xz
rsyslog-8985d50fea62e1794c8e1a12d09733007869a6b4.zip
Merge branch 'v5-stable' into v5-beta
Diffstat (limited to 'plugins')
-rw-r--r--plugins/omudpspoof/omudpspoof.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/plugins/omudpspoof/omudpspoof.c b/plugins/omudpspoof/omudpspoof.c
index 11be59d6..30792531 100644
--- a/plugins/omudpspoof/omudpspoof.c
+++ b/plugins/omudpspoof/omudpspoof.c
@@ -24,7 +24,7 @@
* rgerhards, 2009-07-10
*
* Copyright 2009 David Lang (spoofing code)
- * Copyright 2009 Rainer Gerhards and Adiscon GmbH.
+ * Copyright 2009-2012 Rainer Gerhards and Adiscon GmbH.
*
* This file is part of rsyslog.
*
@@ -191,8 +191,6 @@ UDPSend(instanceData *pData, uchar *pszSourcename, char *msg, size_t len)
struct addrinfo *r;
int lsent = 0;
int bSendSuccess;
- int j, build_ip;
- u_char opt[20];
struct sockaddr_in *tempaddr,source_ip;
libnet_ptag_t ip, ipo;
libnet_ptag_t udp;
@@ -230,17 +228,8 @@ UDPSend(instanceData *pData, uchar *pszSourcename, char *msg, size_t len)
DBGPRINTF("Can't build UDP header: %s\n", libnet_geterror(libnet_handle));
}
- build_ip = 0;
- /* this is not a legal options string */
- for (j = 0; j < 20; j++) {
- opt[j] = libnet_get_prand(LIBNET_PR2);
- }
- ipo = libnet_build_ipv4_options(opt, 20, libnet_handle, ipo);
- if (ipo == -1) {
- DBGPRINTF("Can't build IP options: %s\n", libnet_geterror(libnet_handle));
- }
ip = libnet_build_ipv4(
- LIBNET_IPV4_H + 20 + len + LIBNET_UDP_H, /* length */
+ LIBNET_IPV4_H + len + LIBNET_UDP_H, /* length */
0, /* TOS */
242, /* IP ID */
0, /* IP Frag */