From c9de05012867b44b6a782df0d3341cfdd73fabc4 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:04:13 +0000 Subject: [PATCH 1/8] Use license file from gnu.org Downloaded from: https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt --- COPYING | 43 +++++++++++++++++++++---------------------- 1 file changed, 21 insertions(+), 22 deletions(-) diff --git a/COPYING b/COPYING index 6c99e3d..d159169 100644 --- a/COPYING +++ b/COPYING @@ -1,13 +1,12 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. - Preamble + Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public @@ -16,7 +15,7 @@ software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) You can apply it to +the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not @@ -56,8 +55,8 @@ patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. - - GNU GENERAL PUBLIC LICENSE + + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -111,7 +110,7 @@ above, provided that you also meet all of these conditions: License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) - + These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in @@ -169,7 +168,7 @@ access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. - + 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is @@ -226,7 +225,7 @@ impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. - + 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License @@ -256,7 +255,7 @@ make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. - NO WARRANTY + NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN @@ -278,9 +277,9 @@ YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it @@ -292,7 +291,7 @@ convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. - Copyright (C) 19yy + Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -304,16 +303,16 @@ the "copyright" line and a pointer to where the full notice is found. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: - Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. @@ -336,5 +335,5 @@ necessary. Here is a sample; alter the names: This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General +library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. From 4b1ba971134aab32903d1b11dcab9104028dbd7e Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:08:59 +0000 Subject: [PATCH 2/8] Fix contributor name and use utf8 encoding --- ChangeLog | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 1c65ab3..d924a4d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4,7 +4,7 @@ VERSION DESCRIPTION - IPv6 support (Sebastien Valat) 0.7.8 - Fix for Issue #33, #34 and #35 contributed by Alexander Rumyanstev. -0.7.7 - Fix for Issue #7 & #17 contributed by Michael G�hler. +0.7.7 - Fix for Issue #7 & #17 contributed by Michael Göhler. All IPs assigned to a single interface are now listened on. - Fix for compile warning on OSX where daemon() is deprecated. - Fix for Issue #15 - list.c OpenBSD segfault: change malloc @@ -13,7 +13,7 @@ VERSION DESCRIPTION correctly. 0.7.5 - Added Greg Kuchyt's knock_add script but updated to be a generic IPTables helper that also deletes rules -0.7.4 - Patches from Michael Göhler +0.7.4 - Patches from Michael Göhler - Updated gitignore to include additional autoconf files. - Updated Makefile to fix deprecated warning on CPPFLAG -D_BSD_SOURCE. From b84ccb9b2b2af3ff2249975b5eb36460ffaea23a Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:42:32 +0000 Subject: [PATCH 3/8] Use consistent style --- src/knockd.c | 10 +++++----- src/list.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/knockd.c b/src/knockd.c index eff10bc..8cb8149 100644 --- a/src/knockd.c +++ b/src/knockd.c @@ -404,7 +404,7 @@ void dprint_sequence(opendoor_t *door, char *fmt, ...) vprintf(fmt, args); va_end(args); for(i = 0; i < door->seqcount; i++) { - switch(door->protocol[i]){ + switch(door->protocol[i]) { case IPPROTO_UDP: printf((i == door->seqcount-1 ? "%u:udp\n" : "%u:udp,"), door->sequence[i]); break; @@ -824,9 +824,9 @@ int parse_port_sequence(char *sequence, opendoor_t *door) return(1); } door->sequence[door->seqcount++] = (unsigned short)portnum; - if((protocol = strsep(&num, ":"))){ + if((protocol = strsep(&num, ":"))) { protocol = strtoupper(trim(protocol)); - if(!strcmp(protocol, "TCP")){ + if(!strcmp(protocol, "TCP")) { door->protocol[door->seqcount-1] = IPPROTO_TCP; } else if(!strcmp(protocol, "UDP")) { door->protocol[door->seqcount-1] = IPPROTO_UDP; @@ -1407,7 +1407,7 @@ size_t parse_cmd(char* dest, size_t size, const char* command, const char* src) /* Execute a command through the system shell and wait for return */ -int exec_cmd(char* command, char* name){ +int exec_cmd(char* command, char* name) { int ret; logprint("%s: running command: %s\n", name, command); @@ -1573,7 +1573,7 @@ void process_attempt(knocker_t *attempt) /* all parsing ok --> execute the parsed (%IP% = source IP) command */ exec_cmd(parsed_start_cmd, attempt->door->name); /* if stop_command is set, sleep for cmd_timeout and run it*/ - if(stop_command){ + if(stop_command) { sleep(attempt->door->cmd_timeout); if(attempt->srchost) { vprint("%s (%s): %s: command timeout\n", attempt->src, attempt->srchost, attempt->door->name); diff --git a/src/list.c b/src/list.c index 011ef8d..7856511 100644 --- a/src/list.c +++ b/src/list.c @@ -231,7 +231,7 @@ void list_display(const char *title, PMList *list) int i; cols = len; printf("\n"); - for (i = 0; i < len+1; i++) { + for(i = 0; i < len+1; i++) { printf(" "); } } From d69990cb18169e5667571e78b44062ed847ab134 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:03:48 +0000 Subject: [PATCH 4/8] Add final newline --- src/knock_helper_ipt.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/knock_helper_ipt.sh b/src/knock_helper_ipt.sh index 8577331..03edb23 100644 --- a/src/knock_helper_ipt.sh +++ b/src/knock_helper_ipt.sh @@ -186,4 +186,4 @@ if [ "$SEEN" -eq 0 ]; then if [ "$DRY_RUN" -eq 0 ]; then eval $IPTABLES $IPT_METHOD $IPT_CHAIN -s $IPT_SRC_IP -p $IPT_PROTO --dport $IPT_DST_PORT -j $IPT_RULE_TARGET $COMMENT fi -fi \ No newline at end of file +fi From 443ed2fe74efc2dbddd5bb56fe12f257d7ed714c Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:23:20 +0000 Subject: [PATCH 5/8] Fix shellcheck warnings --- src/knock_helper_ipt.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/knock_helper_ipt.sh b/src/knock_helper_ipt.sh index 03edb23..471332d 100644 --- a/src/knock_helper_ipt.sh +++ b/src/knock_helper_ipt.sh @@ -3,7 +3,7 @@ # Original version to add non-duplicated rules by Greg Kuchyt (greg.kuchyt@gmail.com) # Updated to handle deletes and be generic by Paul Rogers (paul.rogers@flumps.org) -SCRIPT_NAME=$(basename $0) +SCRIPT_NAME=$(basename "$0") AWK="/bin/awk" GREP="/bin/grep" @@ -43,7 +43,7 @@ usage() { echo "-v|--verbose Print verbose information about actions" } -ARGS=$(getopt -o aixf:d:p:c:m::thv -l "append,insert,delete,srcaddr:,dstport:,proto:,chain:,comment::,test,help,verbose" -n $SCRIPT_NAME -- "$@") +ARGS=$(getopt -o aixf:d:p:c:m::thv -l "append,insert,delete,srcaddr:,dstport:,proto:,chain:,comment::,test,help,verbose" -n "$SCRIPT_NAME" -- "$@") if [ $? -ne 0 ]; then @@ -153,7 +153,7 @@ if [ -n "$IPT_COMMENT" ]; then COMMENT="-m comment --comment '$IPT_COMMENT'" fi -$IPTABLES -L $IPT_CHAIN &> /dev/null +$IPTABLES -L "$IPT_CHAIN" >/dev/null 2>&1 if [ 0 -ne "$?" ]; then echo "$SCRIPT_NAME - Error: $IPT_CHAIN is not a valid NetFilter chain" exit @@ -161,13 +161,13 @@ fi # End sanity checks # Dupe checking -for IP in `$IPTABLES -n -L $IPT_CHAIN | $GREP $IPT_RULE_TARGET | $AWK '{print $4}' | $SORT -u`; +for IP in `$IPTABLES -n -L "$IPT_CHAIN" | $GREP "$IPT_RULE_TARGET" | $AWK '{print $4}' | $SORT -u`; do if [ "$VERBOSE" -eq 1 ]; then echo "$SCRIPT_NAME - $IP" fi - if [ "$IPT_SRC_IP" == "$IP" ]; then + if [ "$IPT_SRC_IP" = "$IP" ]; then SEEN=1 fi done @@ -180,7 +180,7 @@ fi if [ "$SEEN" -eq 0 ]; then if [ "$VERBOSE" -eq 1 ]; then echo "$SCRIPT_NAME - $IPT_COMMENT" - echo $IPTABLES $IPT_METHOD $IPT_CHAIN -s $IPT_SRC_IP -p $IPT_PROTO --dport $IPT_DST_PORT -j $IPT_RULE_TARGET $COMMENT + echo "$IPTABLES $IPT_METHOD $IPT_CHAIN -s $IPT_SRC_IP -p $IPT_PROTO --dport $IPT_DST_PORT -j $IPT_RULE_TARGET $COMMENT" fi if [ "$DRY_RUN" -eq 0 ]; then From 5fce39b7b3f190049578996fa0ab6ff9184badf0 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:29:50 +0000 Subject: [PATCH 6/8] Don't mix tabs and spaces And fix other alignment issues. --- src/knock_helper_ipt.sh | 28 +++++++++++++--------------- 1 file changed, 13 insertions(+), 15 deletions(-) diff --git a/src/knock_helper_ipt.sh b/src/knock_helper_ipt.sh index 471332d..074f174 100644 --- a/src/knock_helper_ipt.sh +++ b/src/knock_helper_ipt.sh @@ -45,17 +45,16 @@ usage() { ARGS=$(getopt -o aixf:d:p:c:m::thv -l "append,insert,delete,srcaddr:,dstport:,proto:,chain:,comment::,test,help,verbose" -n "$SCRIPT_NAME" -- "$@") -if [ $? -ne 0 ]; -then - echo "$SCRIPT_NAME - Error! Invalid arguments" - usage - exit 1 +if [ $? -ne 0 ]; then + echo "$SCRIPT_NAME - Error! Invalid arguments" + usage + exit 1 fi eval set -- "$ARGS" while true; do - case "$1" in + case "$1" in -a|--append) IPT_METHOD="-A" shift; @@ -88,7 +87,7 @@ while true; do case "$2" in "") IPT_COMMENT=$COMMENT_DEFAULT; - shift 2;; + shift 2 ;; *) IPT_COMMENT=$2; shift 2 ;; @@ -96,8 +95,8 @@ while true; do ;; -t|--test) DRY_RUN=1 - shift; - ;; + shift; + ;; -h|--help) usage shift; @@ -107,11 +106,11 @@ while true; do VERBOSE=1 shift; ;; - --) - shift; - break; - ;; - esac + --) + shift; + break; + ;; + esac done # Begin sanity checks @@ -176,7 +175,6 @@ if [ "$VERBOSE" -eq 1 ]; then echo "$SCRIPT_NAME - Seen: $SEEN" fi - if [ "$SEEN" -eq 0 ]; then if [ "$VERBOSE" -eq 1 ]; then echo "$SCRIPT_NAME - $IPT_COMMENT" From 1fc313fe0a315d029b7894557d3dca512c99673e Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:05:55 +0000 Subject: [PATCH 7/8] Fix spelling --- CONTRIBUTERS | 2 +- src/knock_helper_ipt.sh | 2 +- src/knockd.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTERS b/CONTRIBUTERS index 8bca7a5..3b534dd 100644 --- a/CONTRIBUTERS +++ b/CONTRIBUTERS @@ -1,5 +1,5 @@ Many thanks to everybody who has helped to improve knockd in some way. This is -a fairly old project, and some contributer names have almost surely been lost +a fairly old project, and some contributor names have almost surely been lost along the way. Thanks to the unsung heroes too. - airwoflgh diff --git a/src/knock_helper_ipt.sh b/src/knock_helper_ipt.sh index 074f174..fd31dd3 100644 --- a/src/knock_helper_ipt.sh +++ b/src/knock_helper_ipt.sh @@ -37,7 +37,7 @@ usage() { echo "-d|--dstport The destination port to be used in the rule" echo "-p|--proto The protocol that the rule applies to; default: $IPT_PROTO" echo "-c|--chain The NetFilter chain to apply the change to; default: $IPT_CHAIN" - echo "-m|--comment Overide default comment text: '$COMMENT_DEFAULT'" + echo "-m|--comment Override default comment text: '$COMMENT_DEFAULT'" echo "-t|--test Test run - don't actually perform an update to NetFilter" echo "-h|--help Print this informational screen and exit" echo "-v|--verbose Print verbose information about actions" diff --git a/src/knockd.c b/src/knockd.c index 8cb8149..bfc6bc7 100644 --- a/src/knockd.c +++ b/src/knockd.c @@ -877,7 +877,7 @@ long get_next_one_time_sequence(opendoor_t *door) continue; } if(parse_port_sequence(line, door) > 0) { - /* continue searching if parse_port_sequnce returned with an error */ + /* continue searching if parse_port_sequence returned with an error */ continue; } return(pos); @@ -1134,7 +1134,7 @@ void generate_pcap_filter() bufsize = realloc_strcat(&buffer, ")", bufsize); /* close parentheses of UDP ports */ } - bufsize = realloc_strcat(&buffer, "))", bufsize); /* close parantheses around port filters */ + bufsize = realloc_strcat(&buffer, "))", bufsize); /* close parentheses around port filters */ /* test if in any of the precedent calls to realloc_strcat() failed. We can do this safely here because * realloc_strcat() returns 0 on failure and if a buffer size of 0 is passed to it, the function does From 23edf79584b264dfb1bdd5d2e8918a5518719d27 Mon Sep 17 00:00:00 2001 From: a1346054 <36859588+a1346054@users.noreply.github.com> Date: Sun, 5 Sep 2021 12:05:31 +0000 Subject: [PATCH 8/8] Trim excess whitespace --- README.md | 7 +++---- doc/knockd.1.in | 12 ++++++------ knockd.conf | 1 - src/knockd.c | 8 ++++---- src/list.c | 6 +++--- src/list.h | 4 ++-- 6 files changed, 18 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index ca52f55..307c803 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ Copyright (c) 2004, Judd Vinet -### ABOUT +### ABOUT This is a port-knocking server/client. Port-knocking is a method where a server can sniff one of its interfaces for a special "knock" sequence of @@ -22,7 +22,7 @@ installed. Then run the following: $ sudo make install -### EXAMPLE +### EXAMPLE The example below could be used to run a strict (DENY policy) firewall that can only be accessed after a successful knock sequence. @@ -47,10 +47,9 @@ powerful clients. - [sendip](http://freshmeat.net/projects/sendip/) -### OTHER IMPLEMENTATIONS +### OTHER IMPLEMENTATIONS Here are some other implementations of port-knocking: - [pasmal](http://sourceforge.net/projects/pasmal/) - [doorman](http://doorman.sourceforge.net/) - diff --git a/doc/knockd.1.in b/doc/knockd.1.in index b69ca06..12c4356 100644 --- a/doc/knockd.1.in +++ b/doc/knockd.1.in @@ -118,7 +118,7 @@ sniffing the network). start_command = /usr/sbin/iptables \-A INPUT \-s %IP% \-p tcp \-\-dport 25 \-j ACCEPT cmd_timeout = 5 stop_command = /usr/sbin/iptables \-D INPUT \-s %IP% \-p tcp \-\-dport 25 \-j ACCEPT - + .fi .TP .SH Example #4: @@ -139,7 +139,7 @@ of the two protocols. cmd_timeout = 5 stop_command = /usr/sbin/iptables \-D INPUT \-s %IP% \-p tcp \-\-dport 25 \-j ACCEPT stop_command_6 = /usr/sbin/ip6tables \-D INPUT \-s %IP% \-p tcp \-\-dport 25 \-j ACCEPT - + .fi .RE .SH CONFIGURATION: GLOBAL DIRECTIVES @@ -222,18 +222,18 @@ Time to wait (in seconds) between \fBStart_Command\fP and \fBStop_Command\fP. This directive is optional, only required if \fBStop_Command\fP is used. .TP .B "Stop_Command = " -Specify the command to be executed when \fBCmd_Timeout\fP seconds have passed +Specify the command to be executed when \fBCmd_Timeout\fP seconds have passed since \fBStart_Command\fP has been executed. All instances of \fB%IP%\fP will be replaced with the knocker's IP address. This directive is optional. .TP .B "Stop_Command_6 = " -Specify the command to be executed when \fBCmd_Timeout\fP seconds have passed +Specify the command to be executed when \fBCmd_Timeout\fP seconds have passed since \fBStart_Command_6\fP has been executed. All instances of \fB%IP%\fP will be replaced with the knocker's IP address. This directive is optional. -If not present it will automatically fallback onto the same IPV4 +If not present it will automatically fallback onto the same IPV4 \fBStop_Command\fP value. You can use empty value to force doing nothing. -.SH SECURITY NOTES +.SH SECURITY NOTES Using the \fB-l\fP or \fB--lookup\fP commandline option to resolve DNS names for log entries may be a security risk! An attacker may find out the first port of a sequence if he can monitor the DNS traffic of the host running knockd. diff --git a/knockd.conf b/knockd.conf index 7770027..58dfb8d 100644 --- a/knockd.conf +++ b/knockd.conf @@ -18,4 +18,3 @@ seq_timeout = 5 command = /usr/local/sbin/knock_add -i -c INPUT -p tcp -d 443 -f %IP% tcpflags = syn - diff --git a/src/knockd.c b/src/knockd.c index bfc6bc7..dd0f802 100644 --- a/src/knockd.c +++ b/src/knockd.c @@ -409,7 +409,7 @@ void dprint_sequence(opendoor_t *door, char *fmt, ...) printf((i == door->seqcount-1 ? "%u:udp\n" : "%u:udp,"), door->sequence[i]); break; case IPPROTO_TCP: /* fallthrough */ - default: + default: printf((i == door->seqcount-1 ? "%u:tcp\n" : "%u:tcp,"), door->sequence[i]); } } @@ -609,7 +609,7 @@ int parseconfig(char *configfile) door->name[sizeof(door->name)-1] = '\0'; door->target = 0; door->seqcount = 0; - door->seq_timeout = SEQ_TIMEOUT; /* default sequence timeout (seconds) */ + door->seq_timeout = SEQ_TIMEOUT; /* default sequence timeout (seconds) */ door->start_command = NULL; door->start_command6 = NULL; door->cmd_timeout = CMD_TIMEOUT; /* default command timeout (seconds) */ @@ -1035,7 +1035,7 @@ void generate_pcap_filter() bufsize = realloc_strcat(&buffer, ")", bufsize); /* close parentheses of TCP ports */ } - /* append the TCP flag filters */ + /* append the TCP flag filters */ if(tcp_present) { if(door->flag_fin != DONT_CARE) { if(ipv6) @@ -1848,7 +1848,7 @@ void sniff(u_char* arg, const struct pcap_pkthdr* hdr, const u_char* packet) attempt->from_ipv6 = from_ipv6; attempt->srchost = NULL; strcpy(attempt->src, src_ip); - /* try a reverse lookup if enabled */ + /* try a reverse lookup if enabled */ if(o_lookup) { if(from_ipv6 == 0) { diff --git a/src/list.c b/src/list.c index 7856511..063602d 100644 --- a/src/list.c +++ b/src/list.c @@ -1,8 +1,8 @@ /* * list.c - * + * * Copyright (c) 2002-2005 by Judd Vinet - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -26,7 +26,7 @@ PMList* list_new() { PMList *list = NULL; - + list = (PMList*)calloc(1, sizeof(PMList)); if(list == NULL) { return(NULL); diff --git a/src/list.h b/src/list.h index 05c90e8..19748fa 100644 --- a/src/list.h +++ b/src/list.h @@ -1,8 +1,8 @@ /* * list.h - * + * * Copyright (c) 2002-2005 by Judd Vinet - * + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or