Hello community,

here is the log from the commit of package nfacct for openSUSE:Factory checked 
in at 2016-08-28 12:18:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/nfacct (Old)
 and      /work/SRC/openSUSE:Factory/.nfacct.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "nfacct"

Changes:
--------
--- /work/SRC/openSUSE:Factory/nfacct/nfacct.changes    2014-09-26 
11:21:14.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.nfacct.new/nfacct.changes       2016-08-28 
12:18:04.000000000 +0200
@@ -1,0 +2,7 @@
+Mon Aug 22 11:42:15 UTC 2016 - [email protected]
+
+- Update to new upstream release 1.0.2
+* Add JSON output formatting to nfacct utility
+* nfacct: adding quota capabilities
+
+-------------------------------------------------------------------

Old:
----
  nfacct-1.0.1.tar.bz2
  nfacct-1.0.1.tar.bz2.sig

New:
----
  nfacct-1.0.2.tar.bz2
  nfacct-1.0.2.tar.bz2.sig

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ nfacct.spec ++++++
--- /var/tmp/diff_new_pack.6P3psT/_old  2016-08-28 12:18:06.000000000 +0200
+++ /var/tmp/diff_new_pack.6P3psT/_new  2016-08-28 12:18:06.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package nfacct
 #
-# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,7 +17,7 @@
 
 
 Name:           nfacct
-Version:        1.0.1
+Version:        1.0.2
 Release:        0
 Summary:        Netfilter Extended Accounting utility
 License:        GPL-2.0+
@@ -26,15 +26,14 @@
 
 #Git-Web:      http://git.netfilter.org/
 #Git-Clone:    git://git.netfilter.org/nfacct
-#DL-URL:       http://netfilter.org/projects/nfacct/files/
-Source:         
http://netfilter.org/projects/nfacct/files/%name-%version.tar.bz2
-Source2:        
http://netfilter.org/projects/nfacct/files/%name-%version.tar.bz2.sig
+Source:         ftp://ftp.netfilter.org/pub/nfacct/%name-%version.tar.bz2
+Source2:        ftp://ftp.netfilter.org/pub/nfacct/%name-%version.tar.bz2.sig
 Source3:        %name.keyring
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 #git#BuildRequires:  autoconf, automake >= 1.6, libtool
 BuildRequires:  pkgconfig >= 0.21
 BuildRequires:  pkgconfig(libmnl) >= 1.0.0
-BuildRequires:  pkgconfig(libnetfilter_acct) >= 1.0.2
+BuildRequires:  pkgconfig(libnetfilter_acct) >= 1.0.3
 
 %description
 This utility allows you to manipulate the extended accounting

++++++ nfacct-1.0.1.tar.bz2 -> nfacct-1.0.2.tar.bz2 ++++++
++++ 6741 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/compile new/nfacct-1.0.2/compile
--- old/nfacct-1.0.1/compile    1970-01-01 01:00:00.000000000 +0100
+++ new/nfacct-1.0.2/compile    2016-08-22 13:28:29.000000000 +0200
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Written by Tom Tromey <[email protected]>.
+#
+# 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, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# 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, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <[email protected]> or send patches to
+# <[email protected]>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""       $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+       # lazily determine how to convert abs files
+       case `uname -s` in
+         MINGW*)
+           file_conv=mingw
+           ;;
+         CYGWIN*)
+           file_conv=cygwin
+           ;;
+         *)
+           file_conv=wine
+           ;;
+       esac
+      fi
+      case $file_conv/,$2, in
+       *,$file_conv,*)
+         ;;
+       mingw/*)
+         file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+         ;;
+       cygwin/*)
+         file=`cygpath -m "$file" || echo "$file"`
+         ;;
+       wine/*)
+         file=`winepath -w "$file" || echo "$file"`
+         ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+       -o)
+         # configure might choose to run compile as 'compile cc -o foo foo.c'.
+         eat=1
+         case $2 in
+           *.o | *.[oO][bB][jJ])
+             func_file_conv "$2"
+             set x "$@" -Fo"$file"
+             shift
+             ;;
+           *)
+             func_file_conv "$2"
+             set x "$@" -Fe"$file"
+             shift
+             ;;
+         esac
+         ;;
+       -I)
+         eat=1
+         func_file_conv "$2" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -I*)
+         func_file_conv "${1#-I}" mingw
+         set x "$@" -I"$file"
+         shift
+         ;;
+       -l)
+         eat=1
+         func_cl_dashl "$2"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -l*)
+         func_cl_dashl "${1#-l}"
+         set x "$@" "$lib"
+         shift
+         ;;
+       -L)
+         eat=1
+         func_cl_dashL "$2"
+         ;;
+       -L*)
+         func_cl_dashL "${1#-L}"
+         ;;
+       -static)
+         shared=false
+         ;;
+       -Wl,*)
+         arg=${1#-Wl,}
+         save_ifs="$IFS"; IFS=','
+         for flag in $arg; do
+           IFS="$save_ifs"
+           linker_opts="$linker_opts $flag"
+         done
+         IFS="$save_ifs"
+         ;;
+       -Xlinker)
+         eat=1
+         linker_opts="$linker_opts $2"
+         ;;
+       -*)
+         set x "$@" "$1"
+         shift
+         ;;
+       *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+         func_file_conv "$1"
+         set x "$@" -Tp"$file"
+         shift
+         ;;
+       *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+         func_file_conv "$1" mingw
+         set x "$@" "$file"
+         shift
+         ;;
+       *)
+         set x "$@" "$1"
+         shift
+         ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
+case $1 in
+  '')
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <[email protected]>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+       # configure might choose to run compile as 'compile cc -o foo foo.c'.
+       # So we strip '-o arg' only if arg is an object.
+       eat=1
+       case $2 in
+         *.o | *.obj)
+           ofile=$2
+           ;;
+         *)
+           set x "$@" -o "$2"
+           shift
+           ;;
+       esac
+       ;;
+      *.c)
+       cfile=$1
+       set x "$@" "$1"
+       shift
+       ;;
+      *)
+       set x "$@" "$1"
+       shift
+       ;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no '-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # '.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/configure.ac new/nfacct-1.0.2/configure.ac
--- old/nfacct-1.0.1/configure.ac       2013-03-03 22:03:05.000000000 +0100
+++ new/nfacct-1.0.2/configure.ac       2016-08-22 13:25:41.000000000 +0200
@@ -1,4 +1,4 @@
-AC_INIT(nfacct, 1.0.1, [email protected])
+AC_INIT(nfacct, 1.0.2, [email protected])
 
 AC_CANONICAL_HOST
 
@@ -15,12 +15,12 @@
 AC_PROG_LN_S
 
 case "$host" in
-*-*-linux*) ;;
+*-*-linux* | *-*-uclinux*) ;;
 *) AC_MSG_ERROR([Linux only, dude!]);;
 esac
 
 PKG_CHECK_MODULES([LIBMNL], [libmnl >= 1.0.0])
-PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.2])
+PKG_CHECK_MODULES([LIBNETFILTER_ACCT], [libnetfilter_acct >= 1.0.3])
 
 AC_CONFIG_FILES([Makefile src/Makefile include/Makefile include/linux/Makefile 
include/linux/netfilter/Makefile])
 AC_OUTPUT
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/include/linux/netfilter/nfnetlink.h 
new/nfacct-1.0.2/include/linux/netfilter/nfnetlink.h
--- old/nfacct-1.0.1/include/linux/netfilter/nfnetlink.h        2011-12-30 
21:04:45.000000000 +0100
+++ new/nfacct-1.0.2/include/linux/netfilter/nfnetlink.h        2015-05-29 
00:52:44.000000000 +0200
@@ -18,6 +18,10 @@
 #define NFNLGRP_CONNTRACK_EXP_UPDATE   NFNLGRP_CONNTRACK_EXP_UPDATE
        NFNLGRP_CONNTRACK_EXP_DESTROY,
 #define NFNLGRP_CONNTRACK_EXP_DESTROY  NFNLGRP_CONNTRACK_EXP_DESTROY
+       NFNLGRP_NFTABLES,
+#define NFNLGRP_NFTABLES                NFNLGRP_NFTABLES
+       NFNLGRP_ACCT_QUOTA,
+#define NFNLGRP_ACCT_QUOTA             NFNLGRP_ACCT_QUOTA
        __NFNLGRP_MAX,
 };
 #define NFNLGRP_MAX    (__NFNLGRP_MAX - 1)
@@ -49,46 +53,14 @@
 #define NFNL_SUBSYS_OSF                        5
 #define NFNL_SUBSYS_IPSET              6
 #define NFNL_SUBSYS_ACCT               7
-#define NFNL_SUBSYS_COUNT              8
+#define NFNL_SUBSYS_CTNETLINK_TIMEOUT  8
+#define NFNL_SUBSYS_CTHELPER           9
+#define NFNL_SUBSYS_NFTABLES           10
+#define NFNL_SUBSYS_NFT_COMPAT         11
+#define NFNL_SUBSYS_COUNT              12
+
+/* Reserved control nfnetlink messages */
+#define NFNL_MSG_BATCH_BEGIN           NLMSG_MIN_TYPE
+#define NFNL_MSG_BATCH_END             NLMSG_MIN_TYPE+1
 
-#ifdef __KERNEL__
-
-#include <linux/netlink.h>
-#include <linux/capability.h>
-#include <net/netlink.h>
-
-struct nfnl_callback {
-       int (*call)(struct sock *nl, struct sk_buff *skb, 
-                   const struct nlmsghdr *nlh,
-                   const struct nlattr * const cda[]);
-       int (*call_rcu)(struct sock *nl, struct sk_buff *skb, 
-                   const struct nlmsghdr *nlh,
-                   const struct nlattr * const cda[]);
-       const struct nla_policy *policy;        /* netlink attribute policy */
-       const u_int16_t attr_count;             /* number of nlattr's */
-};
-
-struct nfnetlink_subsystem {
-       const char *name;
-       __u8 subsys_id;                 /* nfnetlink subsystem ID */
-       __u8 cb_count;                  /* number of callbacks */
-       const struct nfnl_callback *cb; /* callback for individual types */
-};
-
-extern int nfnetlink_subsys_register(const struct nfnetlink_subsystem *n);
-extern int nfnetlink_subsys_unregister(const struct nfnetlink_subsystem *n);
-
-extern int nfnetlink_has_listeners(struct net *net, unsigned int group);
-extern int nfnetlink_send(struct sk_buff *skb, struct net *net, u32 pid, 
unsigned group,
-                         int echo, gfp_t flags);
-extern int nfnetlink_set_err(struct net *net, u32 pid, u32 group, int error);
-extern int nfnetlink_unicast(struct sk_buff *skb, struct net *net, u_int32_t 
pid, int flags);
-
-extern void nfnl_lock(void);
-extern void nfnl_unlock(void);
-
-#define MODULE_ALIAS_NFNL_SUBSYS(subsys) \
-       MODULE_ALIAS("nfnetlink-subsys-" __stringify(subsys))
-
-#endif /* __KERNEL__ */
-#endif /* _NFNETLINK_H */
+#endif /* _NFNETLINK_H */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/include/linux/netfilter/nfnetlink_acct.h 
new/nfacct-1.0.2/include/linux/netfilter/nfnetlink_acct.h
--- old/nfacct-1.0.1/include/linux/netfilter/nfnetlink_acct.h   2011-12-30 
21:04:45.000000000 +0100
+++ new/nfacct-1.0.2/include/linux/netfilter/nfnetlink_acct.h   2015-05-29 
00:54:05.000000000 +0200
@@ -10,27 +10,35 @@
        NFNL_MSG_ACCT_GET,
        NFNL_MSG_ACCT_GET_CTRZERO,
        NFNL_MSG_ACCT_DEL,
+       NFNL_MSG_ACCT_OVERQUOTA,
        NFNL_MSG_ACCT_MAX
 };
 
+enum nfnl_acct_flags {
+       NFACCT_F_QUOTA_PKTS     = (1 << 0),
+       NFACCT_F_QUOTA_BYTES    = (1 << 1),
+       NFACCT_F_OVERQUOTA      = (1 << 2), /* can't be set from userspace */
+};
+
 enum nfnl_acct_type {
        NFACCT_UNSPEC,
        NFACCT_NAME,
        NFACCT_PKTS,
        NFACCT_BYTES,
        NFACCT_USE,
+       NFACCT_FLAGS,
+       NFACCT_QUOTA,
+       NFACCT_FILTER,
        __NFACCT_MAX
 };
 #define NFACCT_MAX (__NFACCT_MAX - 1)
 
-#ifdef __KERNEL__
-
-struct nf_acct;
-
-extern struct nf_acct *nfnl_acct_find_get(const char *filter_name);
-extern void nfnl_acct_put(struct nf_acct *acct);
-extern void nfnl_acct_update(const struct sk_buff *skb, struct nf_acct 
*nfacct);
-
-#endif /* __KERNEL__ */
+enum nfnl_attr_filter_type {
+       NFACCT_FILTER_UNSPEC,
+       NFACCT_FILTER_MASK,
+       NFACCT_FILTER_VALUE,
+       __NFACCT_FILTER_MAX
+};
+#define NFACCT_FILTER_MAX (__NFACCT_FILTER_MAX - 1)
 
-#endif /* _NFNL_ACCT_H */
+#endif /* _NFNL_ACCT_H_ */
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/m4/libtool.m4 new/nfacct-1.0.2/m4/libtool.m4
--- old/nfacct-1.0.1/m4/libtool.m4      2013-03-03 22:07:12.000000000 +0100
+++ new/nfacct-1.0.2/m4/libtool.m4      2016-08-22 13:28:26.000000000 +0200
@@ -1312,7 +1312,7 @@
   rm -rf conftest*
   ;;
 
-x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \
 s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
   # Find out which ABI we are using.
   echo 'int i;' > conftest.$ac_ext
@@ -1324,9 +1324,19 @@
            LD="${LD-ld} -m elf_i386_fbsd"
            ;;
          x86_64-*linux*)
-           LD="${LD-ld} -m elf_i386"
+           case `/usr/bin/file conftest.o` in
+             *x86-64*)
+               LD="${LD-ld} -m elf32_x86_64"
+               ;;
+             *)
+               LD="${LD-ld} -m elf_i386"
+               ;;
+           esac
            ;;
-         ppc64-*linux*|powerpc64-*linux*)
+         powerpc64le-*)
+           LD="${LD-ld} -m elf32lppclinux"
+           ;;
+         powerpc64-*)
            LD="${LD-ld} -m elf32ppclinux"
            ;;
          s390x-*linux*)
@@ -1345,7 +1355,10 @@
          x86_64-*linux*)
            LD="${LD-ld} -m elf_x86_64"
            ;;
-         ppc*-*linux*|powerpc*-*linux*)
+         powerpcle-*)
+           LD="${LD-ld} -m elf64lppc"
+           ;;
+         powerpc-*)
            LD="${LD-ld} -m elf64ppc"
            ;;
          s390*-*linux*|s390*-*tpf*)
@@ -1688,7 +1701,8 @@
     ;;
   *)
     lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
-    if test -n "$lt_cv_sys_max_cmd_len"; then
+    if test -n "$lt_cv_sys_max_cmd_len" && \
+       test undefined != "$lt_cv_sys_max_cmd_len"; then
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
       lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
     else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/missing new/nfacct-1.0.2/missing
--- old/nfacct-1.0.1/missing    2013-03-03 22:07:15.000000000 +0100
+++ new/nfacct-1.0.2/missing    2016-08-22 13:28:29.000000000 +0200
@@ -1,11 +1,10 @@
 #! /bin/sh
-# Common stub for a few missing GNU programs while installing.
+# Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2012-01-06.13; # UTC
+scriptversion=2013-10-28.13; # UTC
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
-# 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
-# Originally by Fran,cois Pinard <[email protected]>, 1996.
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <[email protected]>, 1996.
 
 # 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
@@ -26,68 +25,40 @@
 # the same distribution terms that you use for the rest of that program.
 
 if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
+  echo 1>&2 "Try '$0 --help' for more information"
   exit 1
 fi
 
-run=:
-sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p'
-sed_minuso='s/.* -o \([^ ]*\).*/\1/p'
-
-# In the cases where this matters, `missing' is being run in the
-# srcdir already.
-if test -f configure.ac; then
-  configure_ac=configure.ac
-else
-  configure_ac=configure.in
-fi
+case $1 in
 
-msg="missing on your system"
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
 
-case $1 in
---run)
-  # Try to run requested program, and just exit if it succeeds.
-  run=
-  shift
-  "$@" && exit 0
-  # Exit code 63 means version mismatch.  This often happens
-  # when the user try to use an ancient version of a tool on
-  # a file that requires a minimum version.  In this case we
-  # we should proceed has if the program had been absent, or
-  # if --run hadn't been passed.
-  if test $? = 63; then
-    run=:
-    msg="probably too old"
-  fi
-  ;;
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
 
   -h|--h|--he|--hel|--help)
     echo "\
 $0 [OPTION]... PROGRAM [ARGUMENT]...
 
-Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
-error status if there is no known handling for PROGRAM.
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
 
 Options:
   -h, --help      display this help and exit
   -v, --version   output version information and exit
-  --run           try to run the given command, and emulate it if it fails
 
 Supported PROGRAM values:
-  aclocal      touch file \`aclocal.m4'
-  autoconf     touch file \`configure'
-  autoheader   touch file \`config.h.in'
-  autom4te     touch the output file, or create a stub one
-  automake     touch all \`Makefile.in' files
-  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
-  flex         create \`lex.yy.c', if possible, from existing .c
-  help2man     touch the output file
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
 
-Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
-\`g' are ignored when checking the name.
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
 
 Send bug reports to <[email protected]>."
     exit $?
@@ -99,228 +70,141 @@
     ;;
 
   -*)
-    echo 1>&2 "$0: Unknown \`$1' option"
-    echo 1>&2 "Try \`$0 --help' for more information"
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
     exit 1
     ;;
 
 esac
 
-# normalize program name to check for.
-program=`echo "$1" | sed '
-  s/^gnu-//; t
-  s/^gnu//; t
-  s/^g//; t'`
-
-# Now exit if we have it, but it failed.  Also exit now if we
-# don't have it and --version was passed (most likely to detect
-# the program).  This is about non-GNU programs, so use $1 not
-# $program.
-case $1 in
-  lex*|yacc*)
-    # Not GNU programs, they don't have --version.
-    ;;
+# Run the given program, remember its exit status.
+"$@"; st=$?
 
-  *)
-    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
-       # We have it, but it failed.
-       exit 1
-    elif test "x$2" = "x--version" || test "x$2" = "x--help"; then
-       # Could not run --version or --help.  This is probably someone
-       # running `$TOOL --version' or `$TOOL --help' to check whether
-       # $TOOL exists and not knowing $TOOL uses missing.
-       exit 1
-    fi
-    ;;
-esac
-
-# If it does not exist, or fails to run (possibly an outdated version),
-# try to emulate it.
-case $program in
-  aclocal*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
-         to install the \`Automake' and \`Perl' packages.  Grab them from
-         any GNU archive site."
-    touch aclocal.m4
-    ;;
-
-  autoconf*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`${configure_ac}'.  You might want to install the
-         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
-         archive site."
-    touch configure
-    ;;
-
-  autoheader*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
-         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
-         from any GNU archive site."
-    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' 
${configure_ac}`
-    test -z "$files" && files="config.h"
-    touch_files=
-    for f in $files; do
-      case $f in
-      *:*) touch_files="$touch_files "`echo "$f" |
-                                      sed -e 's/^[^:]*://' -e 's/:.*//'`;;
-      *) touch_files="$touch_files $f.in";;
-      esac
-    done
-    touch $touch_files
-    ;;
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
 
-  automake*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
-         You might want to install the \`Automake' and \`Perl' packages.
-         Grab them from any GNU archive site."
-    find . -type f -name Makefile.am -print |
-          sed 's/\.am$/.in/' |
-          while read f; do touch "$f"; done
-    ;;
-
-  autom4te*)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, but is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.
-         You can get \`$1' as part of \`Autoconf' from any GNU
-         archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo "#! /bin/sh"
-       echo "# Created by GNU Automake missing as a replacement of"
-       echo "#  $ $@"
-       echo "exit 0"
-       chmod +x $file
-       exit 1
-    fi
-    ;;
-
-  bison*|yacc*)
-    echo 1>&2 "\
-WARNING: \`$1' $msg.  You should only need it if
-         you modified a \`.y' file.  You may need the \`Bison' package
-         in order for those modifications to take effect.  You can get
-         \`Bison' from any GNU archive site."
-    rm -f y.tab.c y.tab.h
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-       case $LASTARG in
-       *.y)
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.c
-           fi
-           SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" y.tab.h
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f y.tab.h; then
-       echo >y.tab.h
-    fi
-    if test ! -f y.tab.c; then
-       echo 'main() { return 0; }' >y.tab.c
-    fi
-    ;;
-
-  lex*|flex*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.l' file.  You may need the \`Flex' package
-         in order for those modifications to take effect.  You can get
-         \`Flex' from any GNU archive site."
-    rm -f lex.yy.c
-    if test $# -ne 1; then
-        eval LASTARG=\${$#}
-       case $LASTARG in
-       *.l)
-           SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
-           if test -f "$SRCFILE"; then
-                cp "$SRCFILE" lex.yy.c
-           fi
-         ;;
-       esac
-    fi
-    if test ! -f lex.yy.c; then
-       echo 'main() { return 0; }' >lex.yy.c
-    fi
-    ;;
-
-  help2man*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-        you modified a dependency of a manual page.  You may need the
-        \`Help2man' package in order for those modifications to take
-        effect.  You can get \`Help2man' from any GNU archive site."
-
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -f "$file"; then
-       touch $file
-    else
-       test -z "$file" || exec >$file
-       echo ".ab help2man is required to generate this page"
-       exit $?
-    fi
-    ;;
-
-  makeinfo*)
-    echo 1>&2 "\
-WARNING: \`$1' is $msg.  You should only need it if
-         you modified a \`.texi' or \`.texinfo' file, or any other file
-         indirectly affecting the aspect of the manual.  The spurious
-         call might also be the consequence of using a buggy \`make' (AIX,
-         DU, IRIX).  You might want to install the \`Texinfo' package or
-         the \`GNU make' package.  Grab either from any GNU archive site."
-    # The file to touch is that specified with -o ...
-    file=`echo "$*" | sed -n "$sed_output"`
-    test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"`
-    if test -z "$file"; then
-      # ... or it is the one specified with @setfilename ...
-      infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
-      file=`sed -n '
-       /^@setfilename/{
-         s/.* \([^ ]*\) *$/\1/
-         p
-         q
-       }' $infile`
-      # ... or it is derived from the source name (dir/f.texi becomes f.info)
-      test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info
-    fi
-    # If the file does not exist, the user really needs makeinfo;
-    # let's fail without touching anything.
-    test -f $file || exit 1
-    touch $file
-    ;;
-
-  *)
-    echo 1>&2 "\
-WARNING: \`$1' is needed, and is $msg.
-         You might have modified some files without having the
-         proper tools for further handling them.  Check the \`README' file,
-         it often tells you about the needed prerequisites for installing
-         this package.  You may also peek at any GNU archive site, in case
-         some other package would contain this missing \`$1' program."
-    exit 1
-    ;;
-esac
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
 
-exit 0
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'autom4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
 
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/nfacct.8 new/nfacct-1.0.2/nfacct.8
--- old/nfacct-1.0.1/nfacct.8   2013-03-03 22:02:50.000000000 +0100
+++ new/nfacct-1.0.2/nfacct.8   2016-02-29 12:44:34.000000000 +0100
@@ -31,7 +31,7 @@
 Get existing accounting object.
 .TP
 .BI "flush "
-Flush the entire table.
+Delete all unused accounting objects.
 .TP
 .BI "version "
 Displays the version information.
@@ -47,6 +47,8 @@
 .TP
 .BI "xml "
 That displays the output in XML format.
+.BI "json "
+That displays the output in JSON format.
 .PP
 .SH SEE ALSO
 .BR iptables (8)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/nfacct-1.0.1/src/nfacct.c new/nfacct-1.0.2/src/nfacct.c
--- old/nfacct-1.0.1/src/nfacct.c       2013-03-03 22:02:50.000000000 +0100
+++ new/nfacct-1.0.2/src/nfacct.c       2016-02-29 12:44:34.000000000 +0100
@@ -10,6 +10,7 @@
 
 #include <stdio.h>
 #include <stdlib.h>
+#include <inttypes.h>
 #include <string.h>
 #include <sys/types.h>
 #include <dirent.h>
@@ -18,9 +19,12 @@
 #include <unistd.h>
 #include <time.h>
 #include <errno.h>
+#include <arpa/inet.h>
 
 #include <libmnl/libmnl.h>
 #include <libnetfilter_acct/libnetfilter_acct.h>
+#include <linux/netfilter/nfnetlink_acct.h>
+#include <linux/netfilter/nfnetlink.h>
 
 enum {
        NFACCT_CMD_NONE = 0,
@@ -32,6 +36,7 @@
        NFACCT_CMD_VERSION,
        NFACCT_CMD_HELP,
        NFACCT_CMD_RESTORE,
+       NFACCT_CMD_LISTEN,
 };
 
 static int nfacct_cmd_list(int argc, char *argv[]);
@@ -42,6 +47,7 @@
 static int nfacct_cmd_version(int argc, char *argv[]);
 static int nfacct_cmd_help(int argc, char *argv[]);
 static int nfacct_cmd_restore(int argc, char *argv[]);
+static int nfacct_cmd_monitor(int argc, char *argv[]);
 
 static void usage(char *argv[])
 {
@@ -58,6 +64,13 @@
        }
 }
 
+static void duparg(const char *key)
+{
+       fprintf(stderr, "Error: duplicate \"%s\" or collision with another "
+               "option \n", key);
+       exit(EXIT_FAILURE);
+}
+
 int main(int argc, char *argv[])
 {
        int cmd = NFACCT_CMD_NONE, ret = 0;
@@ -83,6 +96,8 @@
                cmd = NFACCT_CMD_HELP;
        else if (strncmp(argv[1], "restore", strlen(argv[1])) == 0)
                cmd = NFACCT_CMD_RESTORE;
+       else if (strncmp(argv[1], "monitor", strlen(argv[1])) == 0)
+               cmd = NFACCT_CMD_LISTEN;
        else {
                fprintf(stderr, "nfacct v%s: Unknown command: %s\n",
                        VERSION, argv[1]);
@@ -115,17 +130,20 @@
        case NFACCT_CMD_RESTORE:
                ret = nfacct_cmd_restore(argc, argv);
                break;
+       case NFACCT_CMD_LISTEN:
+               ret = nfacct_cmd_monitor(argc, argv);
+               break;
        }
        return ret < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
 }
 
-static bool xml_header = false;
+static bool fmt_header = false;
 
 static int nfacct_cb(const struct nlmsghdr *nlh, void *data)
 {
        struct nfacct *nfacct;
        char buf[4096];
-       bool *xml = (bool *)data;
+       int *fmt = (int *)data;
 
        nfacct = nfacct_alloc();
        if (nfacct == NULL) {
@@ -138,17 +156,38 @@
                goto err_free;
        }
 
-       if (*xml && !xml_header) {
-               printf("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
-                       "<nfacct>\n");
-               xml_header = true;
+       switch (*fmt) {
+       case NFACCT_SNPRINTF_T_XML:
+               if (!fmt_header) {
+                       printf("<?xml version=\"1.0\" encoding=\"utf-8\"?>\n"
+                               "<nfacct>\n");
+                       fmt_header = true;
+               }
+               break;
+       case NFACCT_SNPRINTF_T_JSON:
+               if (!fmt_header) {
+                       printf("{ \"timestamp\" : %lld, \n"
+                              "  \"nfacct_counters\" : [\n",
+                              (long long) time(NULL));
+                       fmt_header = true;
+               } else
+                       printf(",\n");
+               break;
+       default:
+               break;
        }
 
-       nfacct_snprintf(buf, sizeof(buf), nfacct,
-                       *xml ? NFACCT_SNPRINTF_T_XML :
-                              NFACCT_SNPRINTF_T_PLAIN,
+       nfacct_snprintf(buf, sizeof(buf), nfacct, *fmt,
                        NFACCT_SNPRINTF_F_FULL);
-       printf("%s\n", buf);
+       printf("%s", buf);
+       switch (*fmt) {
+       case NFACCT_SNPRINTF_T_JSON:
+               /* no newline in JSON case */
+               break;
+       default:
+               putchar('\n');
+               break;
+       }
 
 err_free:
        nfacct_free(nfacct);
@@ -156,20 +195,66 @@
        return MNL_CB_OK;
 }
 
+static void _print_footer(int fmt)
+{
+       if (fmt_header) {
+               switch (fmt) {
+               case NFACCT_SNPRINTF_T_XML:
+                       printf("</nfacct>\n");
+                       break;
+               case NFACCT_SNPRINTF_T_JSON:
+                       printf("\n] }\n");
+                       break;
+               default:
+                       break;
+               }
+       }
+}
+
 static int nfacct_cmd_list(int argc, char *argv[])
 {
-       bool zeroctr = false, xml = false;
+       bool zeroctr = false;
+       int fmt = NFACCT_SNPRINTF_T_PLAIN;
        struct mnl_socket *nl;
        char buf[MNL_SOCKET_BUFFER_SIZE];
        struct nlmsghdr *nlh;
        unsigned int seq, portid;
        int ret, i;
+       uint32_t mask = 0, value = 0;
 
        for (i=2; i<argc; i++) {
                if (strncmp(argv[i], "reset", strlen(argv[i])) == 0) {
+                       if (zeroctr)
+                               duparg(argv[i]);
                        zeroctr = true;
                } else if (strncmp(argv[i], "xml", strlen(argv[i])) == 0) {
-                       xml = true;
+                       if (fmt)
+                               duparg(argv[i]);
+                       fmt = NFACCT_SNPRINTF_T_XML;
+               } else if (strncmp(argv[i], "json", strlen(argv[i])) == 0) {
+                       if (fmt)
+                               duparg(argv[i]);
+                       fmt = NFACCT_SNPRINTF_T_JSON;
+               } else if (strncmp(argv[i], "counters", strlen(argv[i])) == 0) {
+                       if (mask || value)
+                               duparg(argv[i]);
+                       mask = NFACCT_F_QUOTA_BYTES | NFACCT_F_QUOTA_PKTS;
+                       value = 0;
+               } else if (strncmp(argv[i], "bytes-quota", strlen(argv[i])) == 
0) {
+                       if (mask || value)
+                               duparg(argv[i]);
+                       mask = NFACCT_F_QUOTA_BYTES;
+                       value = NFACCT_F_QUOTA_BYTES;
+               } else if (strncmp(argv[i], "pkts-quota", strlen(argv[i])) == 
0) {
+                       if (mask || value)
+                               duparg(argv[i]);
+                       mask = NFACCT_F_QUOTA_PKTS;
+                       value = NFACCT_F_QUOTA_PKTS;
+               } else if (strncmp(argv[i], "overquota", strlen(argv[i])) == 0) 
{
+                       if (mask || value)
+                               duparg(argv[i]);
+                       mask = NFACCT_F_OVERQUOTA;
+                       value = NFACCT_F_OVERQUOTA;
                } else {
                        nfacct_perror("unknown argument");
                        return -1;
@@ -181,6 +266,13 @@
                                        NFNL_MSG_ACCT_GET_CTRZERO :
                                        NFNL_MSG_ACCT_GET,
                                     NLM_F_DUMP, seq);
+       if (mask || value) {
+               struct nlattr *nest = mnl_attr_nest_start(nlh, NFACCT_FILTER);
+
+               mnl_attr_put_u32(nlh, NFACCT_FILTER_MASK, htonl(mask));
+               mnl_attr_put_u32(nlh, NFACCT_FILTER_VALUE, htonl(value));
+               mnl_attr_nest_end(nlh, nest);
+       }
 
        nl = mnl_socket_open(NETLINK_NETFILTER);
        if (nl == NULL) {
@@ -201,7 +293,7 @@
 
        ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
        while (ret > 0) {
-               ret = mnl_cb_run(buf, ret, seq, portid, nfacct_cb, &xml);
+               ret = mnl_cb_run(buf, ret, seq, portid, nfacct_cb, &fmt);
                if (ret <= 0)
                        break;
                ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
@@ -212,13 +304,13 @@
        }
        mnl_socket_close(nl);
 
-       if (xml_header)
-               printf("</nfacct>\n");
+       _print_footer(fmt);
 
        return 0;
 }
 
-static int _nfacct_cmd_add(char *name, int pkts, int bytes)
+static int _nfacct_cmd_add(char *name, uint64_t pkts, uint64_t bytes,
+                         uint32_t flags, uint64_t quota)
 {
        struct mnl_socket *nl;
        char buf[MNL_SOCKET_BUFFER_SIZE];
@@ -237,6 +329,10 @@
 
        nfacct_attr_set_u64(nfacct, NFACCT_ATTR_PKTS, pkts);
        nfacct_attr_set_u64(nfacct, NFACCT_ATTR_BYTES, bytes);
+       if (flags) {
+               nfacct_attr_set(nfacct, NFACCT_ATTR_FLAGS, &flags);
+               nfacct_attr_set_u64(nfacct, NFACCT_ATTR_QUOTA, quota);
+       }
 
        seq = time(NULL);
        nlh = nfacct_nlmsg_build_hdr(buf, NFNL_MSG_ACCT_NEW,
@@ -278,19 +374,47 @@
        return 0;
 }
 
-
-
 static int nfacct_cmd_add(int argc, char *argv[])
 {
+       int mode, ret;
+       uint64_t quota;
+
        if (argc < 3) {
                nfacct_perror("missing object name");
                return -1;
-       } else if (argc > 3) {
+       }
+
+       if (argc == 3)
+               return _nfacct_cmd_add(argv[2], 0, 0, 0, 0);
+
+       if (argc == 4) {
+               nfacct_perror("missing quota value");
+               return -1;
+       }
+
+       if (argc == 5) {
+               if (strcmp(argv[3], "byte") && strcmp(argv[3], "packet")) {
+                       nfacct_perror("argument must "
+                                     "\"byte\" or \"packet\"");
+                       return -1;
+               }
+       }
+
+       if (argc > 5) {
                nfacct_perror("too many arguments");
                return -1;
        }
 
-       return _nfacct_cmd_add(argv[2], 0, 0);
+       mode = (strcmp(argv[3], "byte") == 0 ?
+               NFACCT_F_QUOTA_BYTES : NFACCT_F_QUOTA_PKTS);
+
+       ret = sscanf(argv[4], "%"PRIu64"", &quota);
+       if (ret != 1) {
+               nfacct_perror("error reading quota");
+               return -1;
+       }
+
+       return _nfacct_cmd_add(argv[2], 0, 0, mode, quota);
 }
 
 static int nfacct_cmd_delete(int argc, char *argv[])
@@ -361,7 +485,8 @@
 
 static int nfacct_cmd_get(int argc, char *argv[])
 {
-       bool zeroctr = false, xml = false;
+       bool zeroctr = false;
+       int fmt = NFACCT_SNPRINTF_T_PLAIN;
        struct mnl_socket *nl;
        char buf[MNL_SOCKET_BUFFER_SIZE];
        struct nlmsghdr *nlh;
@@ -377,7 +502,9 @@
                if (strncmp(argv[i], "reset", strlen(argv[i])) == 0) {
                        zeroctr = true;
                } else if (strncmp(argv[i], "xml", strlen(argv[i])) == 0) {
-                       xml = true;
+                       fmt = NFACCT_SNPRINTF_T_XML;
+               } else if (strncmp(argv[i], "json", strlen(argv[i])) == 0) {
+                       fmt = NFACCT_SNPRINTF_T_JSON;
                } else {
                        nfacct_perror("unknown argument");
                        return -1;
@@ -420,7 +547,7 @@
 
        ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
        while (ret > 0) {
-               ret = mnl_cb_run(buf, ret, seq, portid, nfacct_cb, &xml);
+               ret = mnl_cb_run(buf, ret, seq, portid, nfacct_cb, &fmt);
                if (ret <= 0)
                        break;
                ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
@@ -431,8 +558,7 @@
        }
        mnl_socket_close(nl);
 
-       if (xml_header)
-               printf("</nfacct>\n");
+       _print_footer(fmt);
 
        return 0;
 }
@@ -514,6 +640,7 @@
        "  get object-name\tGet existing accounting object\n"
        "  flush\t\t\tFlush accounting object table\n"
        "  restore\t\tRestore accounting object table reading 'list' output 
from stdin\n"
+       "  monitor\t\tListens for quota attainment notifications\n"
        "  version\t\tDisplay version and disclaimer\n"
        "  help\t\t\tDisplay this help message\n";
 
@@ -525,26 +652,88 @@
 
 static int nfacct_cmd_restore(int argc, char *argv[])
 {
-       uint64_t pkts, bytes;
-       char name[512];
-       char buffer[512];
-       int ret;
+       uint64_t pkts, bytes, quota;
+       char name[512], mode[512], buffer[512];
+       int ret, flags;
+
        while (fgets(buffer, sizeof(buffer), stdin)) {
                char *semicolon = strchr(buffer, ';');
+
                if (semicolon == NULL) {
                        nfacct_perror("invalid line");
                        return -1;
                }
+
                *semicolon = 0;
-               ret = sscanf(buffer, "{ pkts = %lu, bytes = %lu } = %s",
-                      &pkts, &bytes, name);
-               if (ret != 3) {
-                       nfacct_perror("error reading input");
-                       return -1;
+               ret = flags = 0;
+               quota = 0;
+
+               if (!strstr(buffer, "quota")) {
+                       ret = sscanf(buffer,
+                                    "{ pkts = %"PRIu64", "
+                                    "bytes = %"PRIu64" } = %s",
+                                    &pkts, &bytes, name);
+
+                       if (ret != 3) {
+                               nfacct_perror("error reading input");
+                               return -1;
+                       }
+               } else {
+                       ret = sscanf(buffer, "{ pkts = %"PRIu64", "
+                                    "bytes = %"PRIu64", quota = %"PRIu64", "
+                                    "mode = %s } = %s",
+                                    &pkts, &bytes, &quota, mode, name);
+
+                       if (ret != 5) {
+                               nfacct_perror("error reading input");
+                               return -1;
+                       }
+
+                       flags = (strcmp(mode, "byte") == 0 ?
+                                NFACCT_F_QUOTA_BYTES : NFACCT_F_QUOTA_PKTS);
                }
-               if ((ret = _nfacct_cmd_add(name, pkts, bytes)) != 0)
+
+               ret = _nfacct_cmd_add(name, pkts, bytes, flags, quota);
+               if (ret != 0)
                        return ret;
+       }
+       return 0;
+}
+
+static int nfacct_cmd_monitor(int argc, char *argv[])
+{
+       struct mnl_socket *nl;
+       int fmt = NFACCT_SNPRINTF_T_PLAIN;
+       char buf[MNL_SOCKET_BUFFER_SIZE];
+       int ret, option = NFNLGRP_ACCT_QUOTA;
+
+       nl = mnl_socket_open(NETLINK_NETFILTER);
+       if (nl == NULL) {
+               nfacct_perror("mnl_socket_open");
+               return -1;
+       }
 
+       if (mnl_socket_bind(nl, 0, MNL_SOCKET_AUTOPID) < 0) {
+               nfacct_perror("mnl_socket_bind");
+               return -1;
        }
+
+       mnl_socket_setsockopt(nl, NETLINK_ADD_MEMBERSHIP,
+                             &option, sizeof(int));
+
+       while (1) {
+               ret = mnl_socket_recvfrom(nl, buf, sizeof(buf));
+               if (ret == -1) {
+                       perror("mnl_socket_recvfrom");
+                       break;
+               }
+
+               ret = mnl_cb_run(buf, ret, 0, 0, nfacct_cb, &fmt);
+               if (ret <= 0)
+                       break;
+       }
+
+       mnl_socket_close(nl);
+
        return 0;
 }

++++++ nfacct.keyring ++++++
--- /var/tmp/diff_new_pack.6P3psT/_old  2016-08-28 12:18:06.000000000 +0200
+++ /var/tmp/diff_new_pack.6P3psT/_new  2016-08-28 12:18:06.000000000 +0200
@@ -1,9 +1,14 @@
-pub   4096R/BB5F58CC 2010-10-21 [expires: 2015-10-20]
-uid                  Netfilter Core Team <[email protected]>
-sub   4096R/04B92F5C 2010-10-21 [expires: 2015-10-20]
+pub   4096R/0xA4111F89BB5F58CC 2010-10-21 [expires: 2015-10-20]
+      Key fingerprint = 57FF 5E9C 9AA6 7A86 0B55  7AF7 A411 1F89 BB5F 58CC
+uid                 [ expired] Netfilter Core Team <[email protected]>
+sub   4096R/0x0FD3A13A04B92F5C 2010-10-21 [expires: 2015-10-20]
+
+pub   4096R/0xAB4655A126D292E4 2015-10-19 [expires: 2020-10-17]
+      Key fingerprint = C09D B206 3F1D 7034 BA61  52AD AB46 55A1 26D2 92E4
+uid                 [ unknown] Netfilter Core Team <[email protected]>
+sub   4096R/0xE3B0B6BAE3AAA39E 2015-10-19 [expires: 2020-10-17]
 
 -----BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v2.0.19 (GNU/Linux)
 
 mQINBEzAS5EBEADVlGm+KwODJcVmP33HTCbn/eP8obZbgu+3Z1CYRklF8V43vC6D
 8Jfk7fjD4/gWbAKZxriOESXVAN7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