Code Monkey home page Code Monkey logo

Comments (5)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
[deleted comment]

from honeyd.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
[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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
The patch by  [email protected] did work.

Original comment by [email protected] on 17 Oct 2013 at 5:59

from honeyd.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 27, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.