| 1 |
Logswan 2.1.16 (2025-04-05) |
| 2 |
|
| 3 |
- Close stream on error path if the call to fstat() fails |
| 4 |
- Remove unused resource member from request struct |
| 5 |
- Constify method and protocol name arrays |
| 6 |
- Check MMDB_lookup_string() result before using returned data |
| 7 |
- Move entry_data structure initialization to successful lookup path |
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
Logswan 2.1.15 (2025-03-24) |
| 12 |
|
| 13 |
- Add link to Gentoo package in the README |
| 14 |
- Add initial RPM spec file |
| 15 |
- Bump cmake_minimum_required to 3.5, to allow building with CMake 4.0 |
| 16 |
- Bump cmake_minimum_required to 3.10 to be more future proof |
| 17 |
|
| 18 |
|
| 19 |
|
| 20 |
Logswan 2.1.14 (2023-03-30) |
| 21 |
|
| 22 |
- Add missing void to the usage() function definition |
| 23 |
- Move manual page to the man directory |
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
Logswan 2.1.13 (2022-07-28) |
| 28 |
|
| 29 |
- Remove useless backslashes in usage() |
| 30 |
- Add entries with IPv6 remote hosts to exercise the IPv6 code paths |
| 31 |
- Add an invalid.log log file with invalid lines, for testing purposes |
| 32 |
- Add a few more test cases in CMakeLists.txt |
| 33 |
- Also generate data for IPv6 addresses in the MMDB test database |
| 34 |
- Regenerate the example MMDB database and JSON example output |
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
Logswan 2.1.12 (2021-12-02) |
| 39 |
|
| 40 |
- Fix a use-after-free (read) triggered by strcmp(3) calls. |
| 41 |
|
| 42 |
The parse_request() function didn't zero out the parsed_request struct |
| 43 |
between each call. Since the parsing loop was switched to using getline(3) |
| 44 |
instead of a fixed size buffer to process log lines, it could reference |
| 45 |
already freed memory in certain cases. |
| 46 |
|
| 47 |
Thanks to Brian Carpenter (@geeknik) for finding and reporting the issue. |
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
Logswan 2.1.11 (2021-11-16) |
| 52 |
|
| 53 |
- Bump CMake minimum required version to 2.8.12 |
| 54 |
- Add SPDX short license identifier in source files |
| 55 |
- Use CMAKE_C_STANDARD instead of hardcoding compiler flags |
| 56 |
- Switch to using getline(3) instead of fgets(3) |
| 57 |
- Call hll_init() after doing getopt() processing |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
Logswan 2.1.10 (2021-02-15) |
| 62 |
|
| 63 |
- Only call MMDB_close if the GeoIP option was enabled. This fixes a |
| 64 |
crash on program exit on OpenBSD when running without the GeoIP |
| 65 |
option enabled. |
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
Logswan 2.1.9 (2021-02-15) |
| 70 |
|
| 71 |
- Stop forcing FORTIFY_SOURCE=2, it should be package builders decision |
| 72 |
- Add link to Homebrew package in the README |
| 73 |
- Remove unused countryId variable |
| 74 |
- Remove dead increments for argc and argv |
| 75 |
- Rename variables to get rid of all camelCase occurrences |
| 76 |
- Remove the measuring Logswan memory usage section from the README |
| 77 |
- Try to harmonize usage information everywhere |
| 78 |
- Rename the displayUsage() function to usage() |
| 79 |
- Rename all the parse*() functions to use snake_case |
| 80 |
- Get rid of global variables, move all declarations to main() |
| 81 |
|
| 82 |
|
| 83 |
|
| 84 |
Logswan 2.1.8 (2020-10-19) |
| 85 |
|
| 86 |
- Make displayUsage() static |
| 87 |
- Removing some leading whitespace characters |
| 88 |
- Constify methods and protocols names array |
| 89 |
- Constify countries and continents names and ID arrays |
| 90 |
- Enable FORTIFY_SOURCE level 2 |
| 91 |
- Call memset() to set all entry_data struct fields to zero |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
Logswan 2.1.7 (2020-09-17) |
| 96 |
|
| 97 |
- Add a Perl program to generate an example MMDB database for testing |
| 98 |
- Add a new test case to exercise the IP geolocation codepaths |
| 99 |
- Add support for seccomp on arm |
| 100 |
- Add missing test for __NR_mmap, the mmap syscall doesn't exist on arm |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
Logswan 2.1.6 (2020-07-03) |
| 105 |
|
| 106 |
- Validate architectures for seccomp |
| 107 |
- Minor code shuffling, for consistency with other codebases |
| 108 |
- Add seccomp support on i386, tested on glibc and musl |
| 109 |
- Remove entry for "Netherlands Antilles" in country table |
| 110 |
- Swaziland was officially renamed to Eswatini in 2018 |
| 111 |
- Macedonia was officially renamed to North Macedonia in February 2019 |
| 112 |
- Rename Vatican City to Vatican to be consistent with GeoNames naming |
| 113 |
- Rename Aland to Aland Islands to be consistent with GeoNames naming |
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
Logswan 2.1.5 (2020-06-12) |
| 118 |
|
| 119 |
- Switch the GEOIP2DIR example to point to '/var/db/dbip' |
| 120 |
- Use CLOCK_REALTIME if CLOCK_MONOTONIC is not available |
| 121 |
- Remove unneeded <sys/select.h> and <sys/types.h> includes |
| 122 |
- Add missing <stddef.h> include |
| 123 |
- Remove useless _POSIX_SOURCE define |
| 124 |
- Remove useless _POSIX_C_SOURCE 199309L define |
| 125 |
- Define _GNU_SOURCE in CMakeLists.txt to avoid cluttering source files |
| 126 |
- No need to set HAVE_SECCOMP to 1, defining it is enough |
| 127 |
- Remove some unneeded seccomp related includes |
| 128 |
|
| 129 |
|
| 130 |
|
| 131 |
Logswan 2.1.4 (2020-03-27) |
| 132 |
|
| 133 |
- Move GEOIP2DB definition to CMakeLists.txt, allowing build time |
| 134 |
customization |
| 135 |
- Display database path name in error message |
| 136 |
- Remove direct link to GeoLite2 databases |
| 137 |
- Add dependencies installation instruction for Fedora |
| 138 |
- Change GEOIP2DB default value to "dbip-country-lite.mmdb" |
| 139 |
- Change GEOIP2DIR default value to "${CMAKE_INSTALL_PREFIX}/share/dbip" |
| 140 |
- Mention that DB-IP IP to Country Lite database is now the recommended option |
| 141 |
|
| 142 |
|
| 143 |
|
| 144 |
Logswan 2.1.3 (2020-01-17) |
| 145 |
|
| 146 |
- Add a new test target, to test log processing |
| 147 |
- Move printed statistics after the actual output |
| 148 |
- Use OpenBSD style(9) for function prototypes and declarations |
| 149 |
- Remove seccomp mention in README as it is currently disabled by default |
| 150 |
|
| 151 |
|
| 152 |
|
| 153 |
Logswan 2.1.2 (2019-11-19) |
| 154 |
|
| 155 |
- Add ENABLE_SECCOMP build option, to allow building seccomp support |
| 156 |
conditionally |
| 157 |
- Disable seccomp by default, it needs more testing on non !amd64 platforms |
| 158 |
- Use ${CMAKE_INSTALL_BINDIR} instead of hardcoding 'bin' |
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
Logswan 2.1.1 (2019-10-30) |
| 163 |
|
| 164 |
- Check if system has seccomp in CMakeLists.txt |
| 165 |
- Use the HAVE_SECCOMP macro to check whether or not to enable seccomp |
| 166 |
- Define and use a GEOIP2DB macro to specify GeoLite2 database name |
| 167 |
- Add a switch (-d) to allow specifying path to a GeoIP2 database file |
| 168 |
- Define and use a LOGSWAN_SYSCALL_ALLOW macro to make code more readable |
| 169 |
- Adding missing #include guard in seccomp.h header file |
| 170 |
- Use __NR_ instead of SYS_ prefix in LOGSWAN_SYSCALL_ALLOW |
| 171 |
- Fix the build on aarch64 Linux, where the open() syscall does not exist |
| 172 |
- Add error checking for both prctl() calls |
| 173 |
|
| 174 |
|
| 175 |
|
| 176 |
Logswan 2.1.0 (2019-10-23) |
| 177 |
|
| 178 |
- Add FALLTHROUGH comments where appropriate |
| 179 |
- Add support for parsing HTTP/3 requests |
| 180 |
- Add initial seccomp support on Linux, tested on musl and glibc systems |
| 181 |
|
| 182 |
|
| 183 |
|
| 184 |
Logswan 2.0.4 (2019-08-16) |
| 185 |
|
| 186 |
- Adding #include guard in compat header file |
| 187 |
- Add an example log file and regenerate output example |
| 188 |
- Add dependencies installation instructions for NetBSD and FreeBSD |
| 189 |
- Add final dots for options descriptions |
| 190 |
- Add final dot when printing results summary |
| 191 |
- Use EXIT_SUCCESS and EXIT_FAILURE macros for return values |
| 192 |
- Add a trailing newline when printing JSON output |
| 193 |
|
| 194 |
|
| 195 |
|
| 196 |
Logswan 2.0.3 (2018-10-15) |
| 197 |
|
| 198 |
- Use -std=c11, Logswan requires a C11 compiler for libmaxminddb |
| 199 |
- Enable support for parsing HTTP/2.0 requests, for real this time |
| 200 |
- Revert back to using INT64_MAX for strtonum() maxval, as maxval is long long |
| 201 |
and using UINT64_MAX caused bandwidth parsing to always fail (Thanks James Loh |
| 202 |
for reporting the issue) |
| 203 |
- Move maps of countries and continents to separate files |
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
Logswan 2.0.2 (2018-08-05) |
| 208 |
|
| 209 |
- Use UINT64_MAX for strtonum() maxval |
| 210 |
- Add missing headers and reorder includes |
| 211 |
- Add support for HTTP/2.0 |
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
Logswan 2.0.1 (2018-06-27) |
| 216 |
|
| 217 |
- Do not use -Werror by default |
| 218 |
- Do not always call inet_pton two times per log line, this speeds things up |
| 219 |
- Use bool types for isIPv4 and isIPv6 |
| 220 |
- Use the monotonic clock to determine runtime |
| 221 |
- Move conditional includes for 'pledge' and 'strtonum' in compat.h |
| 222 |
|
| 223 |
|
| 224 |
|
| 225 |
Logswan 2.0.0 (2018-03-16) |
| 226 |
|
| 227 |
- Use type off_t for results struct member fileSize |
| 228 |
- Reflect OpenBSD's pledge() changes |
| 229 |
- Switch to using libmaxminddb and GeoIP2/GeoLite2 databases |
| 230 |
- Add Antarctica to the list of continents |
| 231 |
|
| 232 |
|
| 233 |
|
| 234 |
Logswan 1.07 (2017-02-14) |
| 235 |
|
| 236 |
- Harmonize arrays names |
| 237 |
- Remove array of months, it's currently unused and will likely remain so |
| 238 |
- Simplify internal JSON array and object names |
| 239 |
- Use OpenBSD style(9) for function prototypes and declarations |
| 240 |
- Revert back to using strtok, at least for now |
| 241 |
- Do not use EXIT_SUCCESS and EXIT_FAILURE macros anymore |
| 242 |
- Fix implicit function declaration error on NetBSD (Thanks Maya Rashish) |
| 243 |
- Remove now useless variables initialization and unnecessary includes |
| 244 |
- Do not add an extra new line when displaying usage or version |
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
Logswan 1.06 (2016-12-17) |
| 249 |
|
| 250 |
- Relicensed under the BSD 2-Clause license |
| 251 |
- Use strtok_r instead of strtok to tokenize lines |
| 252 |
- Do not attempt to increment countries and continents arrays if there |
| 253 |
is no GeoIP database loaded |
| 254 |
- Harmonize variable names for the GeoIP databases |
| 255 |
- GeoIP lookups are now disabled by default (add a -g switch to enable) |
| 256 |
- Use fstat on open file descriptor instead of using stat before opening |
| 257 |
the input file |
| 258 |
- Count the log line as invalid if parsedLine.remoteHost is NULL |
| 259 |
- Pass results structure by reference, not by value |
| 260 |
- Initialize some uninitialized variables |
| 261 |
- Headers cleanup |
| 262 |
|
| 263 |
|
| 264 |
|
| 265 |
Logswan 1.05 (2016-02-25) |
| 266 |
|
| 267 |
- Documentation update (notes on measuring Logswan memory usage) |
| 268 |
- Add additional include directories for compat functions + dependencies |
| 269 |
to avoid using relative path in includes |
| 270 |
- Check that *lineBuffer is not NUL before attempting to parse log line |
| 271 |
- Perform GeoIP lookup and HLL add in the same if block |
| 272 |
- Increment IPv4 and IPv6 hits counters individually and conditionally |
| 273 |
- Use CMake to check if the system has OpenBSD's pledge available and |
| 274 |
link pledge conditionally using a null implementation when compiled |
| 275 |
on non OpenBSD systems |
| 276 |
- Adding an array of months, for the upcoming split log functionalities |
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
Logswan 1.04 (2016-01-10) |
| 281 |
|
| 282 |
- Moving global variables into main |
| 283 |
- Using 'size_t' instead of 'int' for array indexes in for loops |
| 284 |
- Using 'uint32_t' for all non 'uint64_t' integers |
| 285 |
- Do not increment hits and processed lines counter for each parsed line, |
| 286 |
compute total only once when everything is parsed |
| 287 |
- Setting 'CMAKE_BUILD_TYPE' to 'Release' and formatting fixes |
| 288 |
- Sanitize CMake script to build under NetBSD (Thanks Kamil Rytarowski) |
| 289 |
- Initializing some uninitialized variables |
| 290 |
- Renaming 'DATADIR' variables to 'GEOIPDIR' |
| 291 |
|
| 292 |
|
| 293 |
|
| 294 |
Logswan 1.03 (2016-01-01) |
| 295 |
|
| 296 |
- Remove header display and do not print name of processed file |
| 297 |
- Print results to stderr instead of stdout |
| 298 |
- Output JSON data to stdout instead of creating a new file |
| 299 |
- Define GeoIP databases path in CMakeLists.txt |
| 300 |
- Adding log file name in the JSON output |
| 301 |
- Removing some hardcoded values and replacing them with constants |
| 302 |
defined in config.h |
| 303 |
- Breaking the loop when a match is found in the request parser |
| 304 |
- Using enumeration constants instead of macros |
| 305 |
- Process GeoIP continent information |
| 306 |
- Re-ordering protocols and methods with more common occurrences on top of |
| 307 |
the list, allowing to break earlier when iterating through the array |
| 308 |
- Adding support for reading logs from standard input |
| 309 |
- Renaming 'definitions' files to 'config' |
| 310 |
- Increasing countries array size, as an attempt to be future-proof |
| 311 |
- Initial support for using pledge() on OpenBSD |
| 312 |
- Documentation updates (HLL precision, Features list, GeoIP databases) |
| 313 |
- Updated JSON output example |
| 314 |
- Added a manual page |
| 315 |
|
| 316 |
|
| 317 |
|
| 318 |
Logswan 1.02 (2015-11-02) |
| 319 |
|
| 320 |
- Renaming 'resource' variable to 'request' in the 'logLine' struct |
| 321 |
- Do not attempt to parse empty date tokens |
| 322 |
- Do not attempt to parse empty request tokens (Thanks Brian Carpenter for |
| 323 |
reporting the issue) |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
Logswan 1.01 (2015-10-01) |
| 328 |
|
| 329 |
- Documentation updates |
| 330 |
- Fixing segfault when request data is empty or malformed (Thanks Jonathan |
| 331 |
Armani for reporting and proposing a fix) |
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
Logswan 1.00 (2015-09-28) |
| 336 |
|
| 337 |
- Initial release |