Hello community, here is the log from the commit of package tallow for openSUSE:Factory checked in at 2019-08-19 20:58:38 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/tallow (Old) and /work/SRC/openSUSE:Factory/.tallow.new.22127 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "tallow" Mon Aug 19 20:58:38 2019 rev:4 rq:724261 version:16+git20190425.e4b3977 Changes: -------- --- /work/SRC/openSUSE:Factory/tallow/tallow.changes 2019-06-07 12:18:24.596789623 +0200 +++ /work/SRC/openSUSE:Factory/.tallow.new.22127/tallow.changes 2019-08-19 20:58:43.096956631 +0200 @@ -1,0 +2,7 @@ +Sat Aug 17 12:47:00 UTC 2019 - [email protected] + +- Update to version 16+git20190425.e4b3977: + * Ensure we don't replay old events. + * Add example whitelist defaults. + +------------------------------------------------------------------- Old: ---- tallow-16+git20190219.35182b8.tar.xz New: ---- tallow-16+git20190425.e4b3977.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ tallow.spec ++++++ --- /var/tmp/diff_new_pack.eyWv8B/_old 2019-08-19 20:58:44.120956465 +0200 +++ /var/tmp/diff_new_pack.eyWv8B/_new 2019-08-19 20:58:44.120956465 +0200 @@ -17,7 +17,7 @@ Name: tallow -Version: 16+git20190219.35182b8 +Version: 16+git20190425.e4b3977 Release: 0 Summary: Temporary IP address ban issuance daemon License: GPL-3.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.eyWv8B/_old 2019-08-19 20:58:44.160956459 +0200 +++ /var/tmp/diff_new_pack.eyWv8B/_new 2019-08-19 20:58:44.160956459 +0200 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">git://github.com/clearlinux/tallow.git</param> - <param name="changesrevision">35182b8447c0af058264fd4b8fbf9abc8011fbea</param> + <param name="changesrevision">e4b39777048b1ccfc815189fdb51019c5e8de903</param> </service> </servicedata> \ No newline at end of file ++++++ tallow-16+git20190219.35182b8.tar.xz -> tallow-16+git20190425.e4b3977.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tallow-16+git20190219.35182b8/src/tallow.c new/tallow-16+git20190425.e4b3977/src/tallow.c --- old/tallow-16+git20190219.35182b8/src/tallow.c 2019-02-19 18:47:54.000000000 +0100 +++ new/tallow-16+git20190425.e4b3977/src/tallow.c 2019-04-25 22:23:03.000000000 +0200 @@ -224,6 +224,7 @@ int r; FILE *f; int timeout = 60; + long long int last_timestamp = 0; json_load_patterns(); @@ -312,8 +313,8 @@ fprintf(stderr, PACKAGE_STRING " Started\n"); for (;;) { - const void *d; - size_t l; + const void *d, *dt; + size_t l, dl; r = sd_journal_wait(j, (uint64_t) timeout * 1000000); if (r == SD_JOURNAL_INVALIDATE) { @@ -327,6 +328,18 @@ while (sd_journal_next(j) != 0) { char *m; + /* + * discard messages older than ones we've already seen before + * this happens when the journal rotates - we get replayed events + */ + if (sd_journal_get_data(j, "_SOURCE_REALTIME_TIMESTAMP", &dt, &dl) == 0) { + long long int lt = atoi(dt + strlen("_SOURCE_REALTIME_TIMESTAMP=")); + if (lt > last_timestamp) + last_timestamp = lt; + else if (lt < last_timestamp) + continue; + } + if (sd_journal_get_data(j, "MESSAGE", &d, &l) < 0) { fprintf(stderr, "Failed to read message field: %s\n", strerror(-r)); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/tallow-16+git20190219.35182b8/tallow.conf new/tallow-16+git20190425.e4b3977/tallow.conf --- old/tallow-16+git20190219.35182b8/tallow.conf 2019-02-19 18:47:54.000000000 +0100 +++ new/tallow-16+git20190425.e4b3977/tallow.conf 2019-04-25 22:23:03.000000000 +0200 @@ -4,4 +4,6 @@ #ipt_path=/usr/sbin #expires=3600 #whitelist=127.0.0.1 +#whitelist=192.168. +#whitelist=10. #ipv6=0
