Comments (5)
Another alternative that would be nice would be to ignore checksums for packets
received on the loopback
interface, but I can't figure out how to get a handle to the interface where
the packet originated in the
functions where the checksum is validated (tcp_recv_cb, udp_recv_cb, etc.).
For now, I have made this change to honeyd_input function to force calculation
of the checksum for a packet
received on a loopback device. This isn't the optimal solution because it
causes checksums to be computed
twice and validated when they should just be ignored, however it avoids having
another command-line
argument to avoid checksumming.
--- a/honeyd.c
+++ b/honeyd.c
@@ -3016,6 +3016,10 @@ honeyd_input(const struct interface *inter, struct ip_hdr
*ip, u_short iplen)
int delay = 0, flags = 0;
struct addr src, addr;
+ if (inter->if_ent.intf_flags & INTF_FLAG_LOOPBACK) {
+ /* Override checksum on IP packet to prevent drops */
+ ip_checksum(ip, iplen);
+ }
addr_pack(&addr, ADDR_TYPE_IP, IP_ADDR_BITS, &ip->ip_dst, IP_ADDR_LEN);
if (!router_used) {
/* Check if a template specific drop rate applies */
Original comment by [email protected]
on 17 May 2010 at 10:13
from honeyd.
[deleted comment]
from honeyd.
[email protected] I tried adding the four lines which you mentioned however it
threw an error for me on ubuntu 12.04 with honeyd 1.5c
./configure went without an error
$ make
make all-recursive
make[1]: Entering directory `/home/nobody/honeypot/honeyd-1.5c'
Making all in .
make[2]: Entering directory `/home/nobody/honeypot/honeyd-1.5c'
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./ -I./compat -I/usr/local/include
-I/usr/local/include -I/usr/local/include -O2 -Wall -g
-DPATH_HONEYDINCLUDE="\"/usr/local/include/honeyd\""
-DPATH_HONEYDDATA="\"/usr/local/share/honeyd\""
-DPATH_HONEYDLIB="\"/usr/local/lib/honeyd\"" -DHONEYD_PLUGINS_DECLARE=""
-DHONEYD_PLUGINS="" -DPATH_RRDTOOL="\"\"" -c honeyd.c
In file included from stats.h:36:0,
from honeyd.c:98:
./compat/sha1.h:23:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:23:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:26:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:28:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:30:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:32:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:35:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:35:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
honeyd.c: In function ‘honeyd_input’:
honeyd.c:2844:2: error: invalid preprocessing directive #nobody
make[2]: *** [honeyd.o] Error 1
make[2]: Leaving directory `/home/nobody/honeypot/honeyd-1.5c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nobody/honeypot/honeyd-1.5c'
make: *** [all] Error 2
someone@somewhere:/home/nobody/honeypot/honeyd-1.5c$
Original comment by [email protected]
on 17 Oct 2013 at 5:56
from honeyd.
The patch by [email protected] did work.
Original comment by [email protected]
on 17 Oct 2013 at 5:59
from honeyd.
how can i applay the patch
i get this error
$make
make all-recursive
make[1]: Entering directory `/root/Downloads/honeyd-1.5c'
Making all in .
make[2]: Entering directory `/root/Downloads/honeyd-1.5c'
gcc -DHAVE_CONFIG_H -I. -I. -I. -I./ -I./compat -I/usr/local/include
-I/usr/local/include -I/usr/local/include -O2 -Wall -g
-DPATH_HONEYDINCLUDE="\"/usr/local/include/honeyd\""
-DPATH_HONEYDDATA="\"/usr/local/share/honeyd\""
-DPATH_HONEYDLIB="\"/usr/local/lib/honeyd\"" -DHONEYD_PLUGINS_DECLARE=""
-DHONEYD_PLUGINS="" -DPATH_RRDTOOL="\"/usr/bin/rrdtool\"" -c honeyd.c
In file included from honeyd.c:97:0:
tagging.h:89:6: error: expected declaration specifiers or ‘...’ before
‘(’ token
tagging.h:89:6: error: expected declaration specifiers or ‘...’ before
‘(’ token
In file included from stats.h:36:0,
from honeyd.c:98:
./compat/sha1.h:23:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:23:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:26:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:28:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:30:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:32:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:35:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
./compat/sha1.h:35:3: warning: ‘__bounded__’ attribute directive ignored
[-Wattributes]
make[2]: *** [honeyd.o] Error 1
make[2]: Leaving directory `/root/Downloads/honeyd-1.5c'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/Downloads/honeyd-1.5c'
make: *** [all] Error 2
Original comment by [email protected]
on 25 Oct 2014 at 12:27
from honeyd.
Related Issues (20)
- Honeyd always run as root, command line -u and -g are overwritten HOT 2
- Unable to query adapter
- Slow transfer to SSH behind Honeyd proxy HOT 1
- Honeyd memory leak when packet size is equal to HONEYD_MTU HOT 2
- Honeyd crashes when handling UDP packets > MTU size HOT 2
- Honeyd syslog bottlenecks HOT 1
- setrlimit: NOFILE: Invalid argument on Mac OS X 10.5 and 10.6
- Small memory leaks HOT 1
- honeyd-1.5c + libevent-2 - tagging.h:89: error: expected declaration specifiers or ‘...’ before ‘(’ token HOT 6
- Add mechanism for proxied services to look up original source and destination HOT 1
- Honeyd infinite loop when interface goes up and down
- editing xprobe2.conf results into segmentation fault
- Honeyd runs but does not virtualise any hosts HOT 2
- honeydctl parse errors HOT 4
- make fails with --as-needed HOT 2
- honeyd bug with ACKs
- ETH_HDR_LEN in arp_recv_cb HOT 2
- "set X.X.X.X ethernet" doesn't always work
- Honeyd segfaults on ping when using "bind X.X.X.X to" HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from honeyd.