From 4602d0109b8d0fa471192d80aab5551b0796f0e6 Mon Sep 17 00:00:00 2001 From: Soner Tari Date: Wed, 6 Oct 2021 12:56:27 +0300 Subject: [PATCH] Update third-party licenses and documentation aho_corasick_template*.h library is licensed under GPLv3. The developer has been contacted for a license change to the LGPL. --- LICENSE.third | 14 ++++++++++++++ src/filter.c | 10 +++++----- src/kbtree.h | 4 ++-- src/main.c | 4 ++-- 4 files changed, 23 insertions(+), 9 deletions(-) diff --git a/LICENSE.third b/LICENSE.third index b9297b8..3796eaa 100644 --- a/LICENSE.third +++ b/LICENSE.third @@ -24,4 +24,18 @@ Mk/xcode.mk: Released under the Unlicense. https://github.com/droe/example.kext +kbtree.h: + + Copyright 1997-1999, 2001, John-Mark Gurney. + 2008-2009, Attractive Chaos. + Licensed under a 2-clause BSD license. + https://github.com/attractivechaos/klib + +aho_corasick_template*.h: + + Copyright 2017 Laurent Farhi + Licensed under the GPL-3.0. + https://github.com/farhiongit/aho-corasick-1975 + Note: The developer has been contacted for a license change to the LGPL. + See the respective source and/or license files for details. diff --git a/src/filter.c b/src/filter.c index 05303df..07af1c3 100644 --- a/src/filter.c +++ b/src/filter.c @@ -2272,7 +2272,7 @@ filter_port_substring_exact_match(ACMachine(char) *acm, char *p) for (size_t j = 0; j < nb; j++) { filter_port_t *value; ACM_get_match(state, j, 0, (void **)&value); - // ACM matches a substring, make sure the match is exact + // ACM matches any substring, make sure the match is exact if (equal(value->port, p)) return value; } @@ -2404,7 +2404,7 @@ filter_site_substring_exact_match(ACMachine(char) *acm, char *s) for (size_t j = 0; j < nb; j++) { filter_site_t *value; ACM_get_match(state, j, 0, (void **)&value); - // ACM matches a substring, make sure the match is exact + // ACM matches any substring, make sure the match is exact if (equal(value->site, s)) return value; } @@ -2567,7 +2567,7 @@ filter_ip_substring_exact_match(ACMachine(char) *acm, char *i) for (size_t j = 0; j < nb; j++) { filter_ip_t *value; ACM_get_match(state, j, 0, (void **)&value); - // ACM matches a substring, make sure the match is exact + // ACM matches any substring, make sure the match is exact if (equal(value->ip, i)) return value; } @@ -2672,7 +2672,7 @@ filter_desc_substring_exact_match(ACMachine(char) *acm, char *k) for (size_t j = 0; j < nb; j++) { filter_desc_t *value; ACM_get_match(state, j, 0, (void **)&value); - // ACM matches a substring, make sure the match is exact + // ACM matches any substring, make sure the match is exact if (equal(value->desc, k)) return value; } @@ -2778,7 +2778,7 @@ filter_user_substring_exact_match(ACMachine(char) *acm, char *u) for (size_t j = 0; j < nb; j++) { filter_user_t *value; ACM_get_match(state, j, 0, (void **)&value); - // ACM matches a substring, make sure the match is exact + // ACM matches any substring, make sure the match is exact if (equal(value->user, u)) return value; } diff --git a/src/kbtree.h b/src/kbtree.h index ced8eb0..d8bc207 100644 --- a/src/kbtree.h +++ b/src/kbtree.h @@ -35,8 +35,8 @@ * - The key_t parameter is the type of the key returned by __getk(). * * For example, the tree nodes can be considered as the values of key-value - * pairs, which may be of a complex data type. And the key may a field in that - * complex data type. + * pairs, which may be of a complex data type. And the key may be a field in + * that complex data type. */ #ifndef __AC_KBTREE_H #define __AC_KBTREE_H diff --git a/src/main.c b/src/main.c index 1dcccfc..734632d 100644 --- a/src/main.c +++ b/src/main.c @@ -930,8 +930,8 @@ main(int argc, char *argv[]) } } - // Free filter rules in linked lists, not needed anymore - // We use filter in conn handling, not filter rule lists + // Free filtering rules in linked lists, not needed anymore + // We use filter in conn handling, not filter_rules for (proxyspec_t *spec = global->spec; spec; spec = spec->next) { filter_rules_free(spec->opts); }