summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-03-19curvetun: Only close() file descriptor if openTobias Klauser1-3/+3
Only attempt to close the file descriptor in error cases where it is actually open. This was discovered by the coverity scanner. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-03-19flowtop: Omit return value in flow_entry_get_sain{4,6}_obj()Tobias Klauser1-10/+6
The return value is never used by the callers, so we don't need to return anything. Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
2013-03-17nacl scripts: include common header and rename build_nacl.shDaniel Borkmann5-15/+24
Add a uniform header comment to the two scripts as present in other scripts in this repository as well. Also rename build_nacl.sh into nacl_build.sh to stay conform in naming. For this, also update all mentions of build_nacl.sh to nacl_build.sh. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16dissector_fuzz: minor: add header file descriptionDaniel Borkmann1-2/+13
Add a missing header file description as present in other scripts, for example. Also credit Stefan for his help. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16trafgen: add csumicmp for ICMP checksum calculationDaniel Borkmann1-0/+2
Both, the IP and ICMP checksums use the same algorithm from RFC1071. Thus, it's enough if we give csumip an alias to csumicmp, so that it can be used in trafgen packet configurations. It's calculated from the ICMP header + data, with value 0 for this field. Suggested-by: Jon Schipp <jonschipp@gmail.com> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16bpfc: support different output formatsDaniel Borkmann2-22/+80
Add different bpf opcode pretty printer to support a variety of output formats for netsniff-ng, xt_bpf, tcpdump, C-like and make future integration of formats easier. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16docs: AUTHORS: add Peter Stuge for his commitDaniel Borkmann1-0/+1
Since we list all authors for their contributions in the AUTHORS, add Peter Stuge for his improvement on the build system. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16build: respect PREFIX_STRING on config file locationsDaniel Borkmann5-12/+14
When setting a prefix from the build system, also pass this through the hard coded strings for config file locations in the toolkit, so that the installed files (which use PREFIX) can be properly found. Suggested-by: Peter Stuge <peter@stuge.se> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16ring: don't care if we cannot active hw timestampingDaniel Borkmann1-13/+8
Hw timestaming is currently done, if we have the header file from the kernel available. If it fails, we currently bail out, which is bullshit. Just returning is enough, since some users might have the header available, but not a NIC supporting hw timestaming. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16ifpps: remove state from enum, since never usedDaniel Borkmann1-2/+1
We do not assign or use this particular state, so just remove it from the enum. We continue anyway in the while loop in that case. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16hash: simplify code and fix whitespacingDaniel Borkmann1-4/+30
Make whitespacing more uniform to coding conventions and also simplify some fubar if + xfree combinations by using free only. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16misc: remove dead/unreachable code from switch statementsDaniel Borkmann3-6/+0
Remove various unreachable sections from the switch statements. This was detected by the coverty scanner. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16flowtop: rcu: omit rcu_assign_pointerDaniel Borkmann1-4/+3
If the new pointer is NULL anyway, this results in a constant expression during compile time (NULL != NULL) where a barrier is left out. Thus, it will have no different effect using rcu_assign_pointer() than assigning it directly. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16xutils: check various return valuesDaniel Borkmann1-14/+35
Check various setsockopt return values and exit accordingly if some of them just fuck up. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16ring: check return value of setsockoptDaniel Borkmann2-4/+14
If something screws up, which is rather unlikely, but if it happens, let the user know. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16netsniff-ng: if we cannot get intermediate pcap statistics, panicDaniel Borkmann1-1/+5
Before we do calculations on statistics, check if we really got them. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16netsniff-ng trafgen: check return value of pull_and_flush_ringDaniel Borkmann2-2/+24
Let us check the return value when the timer triggers a TX flush request to the kernel. However, ignore the case of BADFS and NOBUFS. The socket could already have been closed before the timer triggers in the first case, and in the second, we just let the next timer continue processing if currently the buffer space is exhausted. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16astraceroute: fix getnameinfo argumentsDaniel Borkmann1-4/+4
Coverty detected a misuse of the getnameinfo API, thus, we need to fix the length parameter. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16flowtop: close dir handle first before returning backDaniel Borkmann1-0/+1
Coverty detected that the variable "dir" going out of scope leaks the storage it points to. Thus close the handle first! Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16geoip: reorder statements, so that file handles are closed firstDaniel Borkmann1-4/+3
Coverty detected, when we are in an error condition, we do not close file handles, but just return instead. Thus, reorder statements, so that file handles are closed for sure. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16netsniff-ng: do not leak file descriptors on exitDaniel Borkmann1-9/+6
Covertiy detected that when we redirect sdtin/stdout either via ``-i -'' or ``-o -'', we also need to properly close it when it goes out of scope. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16geoip: make sure we null-terminate after readDaniel Borkmann1-0/+2
Make sure raw is null-terminated after we read the buffer that we receive from the remote end. Detected by coverty scan. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-16docs: update git mirror urlsDaniel Borkmann1-2/+2
Some of the official Git mirror URLs were deprecated, so update them. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: minor: do announcement before taggingDaniel Borkmann1-1/+1
Do the announcement before the tagging is done, since we read out the last tag in creating the shortlog. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: get latest release tag via git-describeDaniel Borkmann1-1/+1
To automatically create the shortlog for the .MAIL_MSG, we use git shortlog. However, we do not want to include old stuff, so let only commits pass that were between the previous release and now. (Untested for now, since there is no futher tag.) Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15docs: add initial workflow documentDaniel Borkmann1-0/+64
Trying to document the workflow that comes along with using this Git repository. Further ideas, additions to this document are welcome to create a unified frame for all maintainers, developers and (advanced) users. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: add make release targetDaniel Borkmann2-1/+23
It is useful to have as much as possible scripted, to be less error-prone and to have a uniform and simple workflow. Therefore, make the tagging, tarball and mail message in a uniform way. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15build: Find libncurses by using pkg-configDaniel Borkmann3-2/+4
Call pkg-config --cflags and pkg-config --libs to find correct CFLAGS and LDFLAGS respectively. Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15netsniff-ng trafgen: Find libnl-3.0 and libnl-genl-3.0 using pkg-configPeter Stuge3-6/+6
Call pkg-config --cflags and pkg-config --libs to find correct CFLAGS and LDFLAGS respectively. Signed-off-by: Peter Stuge <peter@stuge.se> Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
2013-03-15all: import netsniff-ng 0.5.8-rc0 sourceDaniel Borkmann137-0/+50669
We decided to get rid of the old Git history and start a new one for several reasons: *) Allow / enforce only high-quality commits (which was not the case for many commits in the history), have a policy that is more close to the one from the Linux kernel. With high quality commits, we mean code that is logically split into commits and commit messages that are signed-off and have a proper subject and message body. We do not allow automatic Github merges anymore, since they are total bullshit. However, we will either cherry-pick your patches or pull them manually. *) The old archive was about ~27MB for no particular good reason. This basically derived from the bad decision that also some PDF files where stored there. From this moment onwards, no binary objects are allowed to be stored in this repository anymore. The old archive is not wiped away from the Internet. You will still be able to find it, e.g. on git.cryptoism.org etc. Signed-off-by: Daniel Borkmann <dborkman@redhat.com> Signed-off-by: Tobias Klauser <tklauser@distanz.ch>