Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package arping2 for openSUSE:Factory checked 
in at 2022-04-30 22:53:04
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/arping2 (Old)
 and      /work/SRC/openSUSE:Factory/.arping2.new.1538 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "arping2"

Sat Apr 30 22:53:04 2022 rev:22 rq:974100 version:2.23

Changes:
--------
--- /work/SRC/openSUSE:Factory/arping2/arping2.changes  2021-07-17 
23:37:24.653612576 +0200
+++ /work/SRC/openSUSE:Factory/.arping2.new.1538/arping2.changes        
2022-04-30 22:53:19.140287665 +0200
@@ -1,0 +2,8 @@
+Sat Apr 30 10:21:06 UTC 2022 - Ferdinand Thiessen <r...@fthiessen.de>
+
+- Update to release 2.23
+  * Work around VLAN bug in libpcap 1.7-1.9.0
+  * Experimental support for seccomp (off by default)
+  * Made -P set target MAC address (-t)
+
+-------------------------------------------------------------------

Old:
----
  arping-2.22.tar.gz
  arping-2.22.tar.gz.asc

New:
----
  arping-2.23.tar.gz
  arping-2.23.tar.gz.asc

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

Other differences:
------------------
++++++ arping2.spec ++++++
--- /var/tmp/diff_new_pack.IzskrQ/_old  2022-04-30 22:53:19.680288396 +0200
+++ /var/tmp/diff_new_pack.IzskrQ/_new  2022-04-30 22:53:19.684288401 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package arping2
 #
-# Copyright (c) 2021 SUSE LLC
+# Copyright (c) 2022 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,15 +17,15 @@
 
 
 Name:           arping2
-Version:        2.22
+Version:        2.23
 Release:        0
 Summary:        Layer-2 Ethernet pinger
 License:        GPL-2.0-or-later
 Group:          Productivity/Networking/Diagnostic
-URL:            http://www.habets.pp.se/synscan/programs.php?prog=arping
+URL:            https://www.habets.pp.se/synscan/programs.php?prog=arping
 #Git-Clone:    git://github.com/ThomasHabets/arping
-Source:         http://www.habets.pp.se/synscan/files/arping-%version.tar.gz
-Source2:        
http://www.habets.pp.se/synscan/files/arping-%version.tar.gz.asc
+Source:         https://www.habets.pp.se/synscan/files/arping-%version.tar.gz
+Source2:        
https://www.habets.pp.se/synscan/files/arping-%version.tar.gz.asc
 Source3:        %name.keyring
 BuildRequires:  libnet-devel
 BuildRequires:  libpcap-devel

++++++ arping-2.22.tar.gz -> arping-2.23.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/Makefile.in new/arping-2.23/Makefile.in
--- old/arping-2.22/Makefile.in 2021-06-27 23:28:23.000000000 +0200
+++ new/arping-2.23/Makefile.in 2022-03-06 19:16:15.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
@@ -199,6 +199,8 @@
 DIST_ARCHIVES = $(distdir).tar.gz
 GZIP_ENV = --best
 DIST_TARGETS = dist-gzip
+# Exists only to be overridden by the user if desired.
+AM_DISTCHECK_DVI_TARGET = dvi
 distuninstallcheck_listfiles = find . -type f -print
 am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
   | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
@@ -618,7 +620,7 @@
            $(DISTCHECK_CONFIGURE_FLAGS) \
            --srcdir=../.. --prefix="$$dc_install_base" \
          && $(MAKE) $(AM_MAKEFLAGS) \
-         && $(MAKE) $(AM_MAKEFLAGS) dvi \
+         && $(MAKE) $(AM_MAKEFLAGS) $(AM_DISTCHECK_DVI_TARGET) \
          && $(MAKE) $(AM_MAKEFLAGS) check \
          && $(MAKE) $(AM_MAKEFLAGS) install \
          && $(MAKE) $(AM_MAKEFLAGS) installcheck \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/README new/arping-2.23/README
--- old/arping-2.22/README      2021-06-27 23:28:21.000000000 +0200
+++ new/arping-2.23/README      2022-03-06 19:16:13.000000000 +0100
@@ -6,7 +6,7 @@
 
  http://www.habets.pp.se/synscan/
  http://github.com/ThomasHabets/arping
- git clone git://github.com/ThomasHabets/arping.git
+ git clone https://github.com/ThomasHabets/arping.git
 
 Introduction
 ------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/aclocal.m4 new/arping-2.23/aclocal.m4
--- old/arping-2.22/aclocal.m4  2021-06-27 23:28:22.000000000 +0200
+++ new/arping-2.23/aclocal.m4  2022-03-06 19:16:14.000000000 +0100
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.16.2 -*- Autoconf -*-
+# generated automatically by aclocal 1.16.3 -*- Autoconf -*-
 
 # Copyright (C) 1996-2020 Free Software Foundation, Inc.
 
@@ -35,7 +35,7 @@
 [am__api_version='1.16'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.16.2], [],
+m4_if([$1], [1.16.3], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -51,7 +51,7 @@
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.16.2])dnl
+[AM_AUTOMAKE_VERSION([1.16.3])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
@@ -739,12 +739,7 @@
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
 if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/config.h.in new/arping-2.23/config.h.in
--- old/arping-2.22/config.h.in 2021-06-27 23:28:23.000000000 +0200
+++ new/arping-2.23/config.h.in 2022-03-06 19:16:14.000000000 +0100
@@ -1,5 +1,8 @@
 /* config.h.in.  Generated from configure.ac by autoheader.  */
 
+/* Disable seccomp by default */
+#undef DEFAULT_SECCOMP
+
 /* Define to 1 if you have the <arpa/inet.h> header file. */
 #undef HAVE_ARPA_INET_H
 
@@ -54,6 +57,9 @@
 /* Define to 1 if you have the `rt' library (-lrt). */
 #undef HAVE_LIBRT
 
+/* Define to 1 if you have the `seccomp' library (-lseccomp). */
+#undef HAVE_LIBSECCOMP
+
 /* Define to 1 if you have the `socket' library (-lsocket). */
 #undef HAVE_LIBSOCKET
 
@@ -87,6 +93,9 @@
 /* Define to 1 if you have the <pwd.h> header file. */
 #undef HAVE_PWD_H
 
+/* Define to 1 if you have the <seccomp.h> header file. */
+#undef HAVE_SECCOMP_H
+
 /* Define to 1 if you have the `select' function. */
 #undef HAVE_SELECT
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/configure new/arping-2.23/configure
--- old/arping-2.22/configure   2021-06-27 23:28:23.000000000 +0200
+++ new/arping-2.23/configure   2022-03-06 19:16:14.000000000 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for arping 2.22.
+# Generated by GNU Autoconf 2.69 for arping 2.23.
 #
 # Report bugs to <tho...@habets.se>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='arping'
 PACKAGE_TARNAME='arping'
-PACKAGE_VERSION='2.22'
-PACKAGE_STRING='arping 2.22'
+PACKAGE_VERSION='2.23'
+PACKAGE_STRING='arping 2.23'
 PACKAGE_BUGREPORT='tho...@habets.se'
 PACKAGE_URL=''
 
@@ -735,6 +735,7 @@
 enable_silent_rules
 enable_maintainer_mode
 enable_dependency_tracking
+enable_seccomp
 enable_hardened
 enable_warnings
 '
@@ -1297,7 +1298,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures arping 2.22 to adapt to many kinds of systems.
+\`configure' configures arping 2.23 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1369,7 +1370,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of arping 2.22:";;
+     short | recursive ) echo "Configuration of arping 2.23:";;
    esac
   cat <<\_ACEOF
 
@@ -1386,6 +1387,7 @@
                           do not reject slow dependency extractors
   --disable-dependency-tracking
                           speeds up one-time build
+Enable seccomp priv drops by default (-z to turn on, -Z for off)
   --enable-hardened       Enable security build options
   --enable-warnings       Enable build warnings
 
@@ -1465,7 +1467,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-arping configure 2.22
+arping configure 2.23
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1934,7 +1936,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by arping $as_me 2.22, which was
+It was created by arping $as_me 2.23, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2599,12 +2601,7 @@
 am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 if test x"${MISSING+set}" != xset; then
-  case $am_aux_dir in
-  *\ * | *\    *)
-    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
-  *)
-    MISSING="\${SHELL} $am_aux_dir/missing" ;;
-  esac
+  MISSING="\${SHELL} '$am_aux_dir/missing'"
 fi
 # Use eval to expand $SHELL
 if eval "$MISSING --is-lightweight"; then
@@ -2909,7 +2906,7 @@
 
 # Define the identity of the package.
  PACKAGE='arping'
- VERSION='2.22'
+ VERSION='2.23'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -4290,6 +4287,51 @@
 
 fi
 
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp_init in 
-lseccomp" >&5
+$as_echo_n "checking for seccomp_init in -lseccomp... " >&6; }
+if ${ac_cv_lib_seccomp_seccomp_init+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lseccomp  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char seccomp_init ();
+int
+main ()
+{
+return seccomp_init ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_seccomp_seccomp_init=yes
+else
+  ac_cv_lib_seccomp_seccomp_init=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: 
$ac_cv_lib_seccomp_seccomp_init" >&5
+$as_echo "$ac_cv_lib_seccomp_seccomp_init" >&6; }
+if test "x$ac_cv_lib_seccomp_seccomp_init" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSECCOMP 1
+_ACEOF
+
+  LIBS="-lseccomp $LIBS"
+
+fi
+
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_gettime in -lrt" 
>&5
 $as_echo_n "checking for clock_gettime in -lrt... " >&6; }
 if ${ac_cv_lib_rt_clock_gettime+:} false; then :
@@ -4526,6 +4568,24 @@
 fi
 
 
+# Check whether --enable-seccomp was given.
+if test "${enable_seccomp+set}" = set; then :
+  enableval=$enable_seccomp;
+   if test "$ac_cv_lib_seccomp_seccomp_init" = "no"; then
+      as_fn_error $? "--enable-seccomp given but seccomp libraries not 
present" "$LINENO" 5
+   fi
+
+$as_echo "#define DEFAULT_SECCOMP 1" >>confdefs.h
+
+
+else
+
+
+$as_echo "#define DEFAULT_SECCOMP 0" >>confdefs.h
+
+
+fi
+
 # Checks for header files.
 ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
@@ -4926,10 +4986,11 @@
 
 for ac_header in \
 arpa/inet.h \
+getopt.h \
 netinet/in.h \
+seccomp.h \
 stdlib.h \
 sys/socket.h \
-getopt.h \
 time.h \
 grp.h \
 sys/time.h \
@@ -6038,7 +6099,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by arping $as_me 2.22, which was
+This file was extended by arping $as_me 2.23, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -6104,7 +6165,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-arping config.status 2.22
+arping config.status 2.23
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/configure.ac new/arping-2.23/configure.ac
--- old/arping-2.22/configure.ac        2021-06-27 23:28:21.000000000 +0200
+++ new/arping-2.23/configure.ac        2022-03-06 19:16:13.000000000 +0100
@@ -2,7 +2,7 @@
 # Process this file with autoconf to produce a configure script.
 
 AC_PREREQ(2.61)
-AC_INIT(arping, 2.22, tho...@habets.se)
+AC_INIT(arping, 2.23, tho...@habets.se)
 AC_CANONICAL_SYSTEM
 AC_CONFIG_SRCDIR([src/arping.c])
 AM_INIT_AUTOMAKE
@@ -26,6 +26,7 @@
 AC_CHECK_LIB([socket], [socket])
 AC_CHECK_LIB([nsl], [gethostbyname])
 AC_CHECK_LIB([cap], [cap_init])
+AC_CHECK_LIB([seccomp], [seccomp_init])
 AC_CHECK_LIB([rt], [clock_gettime])
 AC_CHECK_LIB([net], [libnet_name_resolve],
       [AC_MSG_ERROR([libnet 1.0.x found. Arping 2.x requires libnet 1.1 or 
newer])])
@@ -33,14 +34,23 @@
 AC_CHECK_LIB([pcap], [pcap_open_live], ,[AC_MSG_ERROR([libpcap not found])])
 AC_SEARCH_LIBS([clock_gettime], [rt])
 
+AC_ARG_ENABLE([seccomp], [Enable seccomp priv drops by default (-z to turn on, 
-Z for off)], [
+   if test "$ac_cv_lib_seccomp_seccomp_init" = "no"; then
+      AC_MSG_ERROR([--enable-seccomp given but seccomp libraries not present])
+   fi
+   AC_DEFINE([DEFAULT_SECCOMP], [1], [Enable seccomp by default])
+], [
+   AC_DEFINE([DEFAULT_SECCOMP], [0], [Disable seccomp by default])
+])
 # Checks for header files.
 AC_HEADER_STDC
 AC_CHECK_HEADERS([\
 arpa/inet.h \
+getopt.h \
 netinet/in.h \
+seccomp.h \
 stdlib.h \
 sys/socket.h \
-getopt.h \
 time.h \
 grp.h \
 sys/time.h \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/doc/Makefile.in 
new/arping-2.23/doc/Makefile.in
--- old/arping-2.22/doc/Makefile.in     2021-06-27 23:28:23.000000000 +0200
+++ new/arping-2.23/doc/Makefile.in     2022-03-06 19:16:15.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/doc/arping.8 new/arping-2.23/doc/arping.8
--- old/arping-2.22/doc/arping.8        2021-06-27 23:28:21.000000000 +0200
+++ new/arping-2.23/doc/arping.8        2022-03-06 19:16:13.000000000 +0100
@@ -109,12 +109,12 @@
 .IP "\-T \fIIP\fP"
 Use \-T as target address when pinging MACs that won\(cq\&t
 respond to a broadcast ping but perhaps to a directed broadcast\&.
-.IP 
+.PP 
 \fIExample\fP:
 .nf
 .sp
 To check the address of MAC\-A, use knowledge of MAC\-B and IP\-B\&.
-.IP 
+.PP 
 $ arping \-S <IP\-B> \-s <MAC\-B> \-p <MAC\-A>
 .IP "\-u"
 Show index=received/sent instead of just index=received when
@@ -123,7 +123,7 @@
 Send unsolicited ARP\&. This sets the destination MAC address in
 the ARP frame to the broadcast address\&. Unsolicited ARP is used
 to update the neighbours\(cq\& ARP caches\&.
-.IP 
+.PP 
 \fIExample\fP:
 .nf
 .sp
@@ -136,7 +136,10 @@
 Specify a timeout before ping exits regardless of how many packets have been 
sent or received\&.
 .IP "\-W \fIsec\fP"
 Time to wait between pings\&.
-
+.IP "\-z"
+Enable seccomp (default seccomp state depends on compile options)
+.IP "\-Z"
+Disable seccomp (default seccomp state depends on compile options)
 .PP 
 .SH "EXAMPLES"
 .nf
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/doc/arping.yodl 
new/arping-2.23/doc/arping.yodl
--- old/arping-2.22/doc/arping.yodl     2021-06-27 23:28:21.000000000 +0200
+++ new/arping-2.23/doc/arping.yodl     2022-03-06 19:16:13.000000000 +0100
@@ -36,7 +36,6 @@
 
 manpageoptions()
 
-startdit()
     dit(--help) Show extended help. Not quite as extensive as this manpage,
         but more than -h.
     dit(-0) Use this option to ping with source IP address 0.0.0.0. Use this
@@ -104,7 +103,8 @@
     dit(-V em(vlan)) VLAN tag to set. Defaults to no VLAN tag.
     dit(-w em(sec)) Specify a timeout before ping exits regardless of how many 
packets have been sent or received.
     dit(-W em(sec)) Time to wait between pings.
-enddit()
+    dit(-z) Enable seccomp (default seccomp state depends on compile options)
+    dit(-Z) Disable seccomp (default seccomp state depends on compile options)
 
 
 manpagesection(EXAMPLES)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/install-sh new/arping-2.23/install-sh
--- old/arping-2.22/install-sh  2021-06-27 23:28:23.000000000 +0200
+++ new/arping-2.23/install-sh  2022-03-06 19:16:15.000000000 +0100
@@ -1,7 +1,7 @@
 #!/bin/sh
 # install - install a program, script, or datafile
 
-scriptversion=2018-03-11.20; # UTC
+scriptversion=2020-11-14.01; # UTC
 
 # This originates from X11R5 (mit/util/scripts/install.sh), which was
 # later released in X11R6 (xc/config/util/install.sh) with the
@@ -69,6 +69,11 @@
 # Desired mode of installed file.
 mode=0755
 
+# Create dirs (including intermediate dirs) using mode 755.
+# This is like GNU 'install' as of coreutils 8.32 (2020).
+mkdir_umask=22
+
+backupsuffix=
 chgrpcmd=
 chmodcmd=$chmodprog
 chowncmd=
@@ -99,18 +104,28 @@
      --version  display version info and exit.
 
   -c            (ignored)
-  -C            install only if different (preserve the last data modification 
time)
+  -C            install only if different (preserve data modification time)
   -d            create directories instead of installing files.
   -g GROUP      $chgrpprog installed files to GROUP.
   -m MODE       $chmodprog installed files to MODE.
   -o USER       $chownprog installed files to USER.
+  -p            pass -p to $cpprog.
   -s            $stripprog installed files.
+  -S SUFFIX     attempt to back up existing files, with suffix SUFFIX.
   -t DIRECTORY  install into DIRECTORY.
   -T            report an error if DSTFILE is a directory.
 
 Environment variables override the default commands:
   CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
   RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-autom...@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
 "
 
 while test $# -ne 0; do
@@ -137,8 +152,13 @@
     -o) chowncmd="$chownprog $2"
         shift;;
 
+    -p) cpprog="$cpprog -p";;
+
     -s) stripcmd=$stripprog;;
 
+    -S) backupsuffix="$2"
+        shift;;
+
     -t)
         is_target_a_directory=always
         dst_arg=$2
@@ -255,6 +275,10 @@
     dstdir=$dst
     test -d "$dstdir"
     dstdir_status=$?
+    # Don't chown directories that already exist.
+    if test $dstdir_status = 0; then
+      chowncmd=""
+    fi
   else
 
     # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -301,22 +325,6 @@
   if test $dstdir_status != 0; then
     case $posix_mkdir in
       '')
-        # Create intermediate dirs using mode 755 as modified by the umask.
-        # This is like FreeBSD 'install' as of 1997-10-28.
-        umask=`umask`
-        case $stripcmd.$umask in
-          # Optimize common cases.
-          *[2367][2367]) mkdir_umask=$umask;;
-          .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
-
-          *[0-7])
-            mkdir_umask=`expr $umask + 22 \
-              - $umask % 100 % 40 + $umask % 20 \
-              - $umask % 10 % 4 + $umask % 2
-            `;;
-          *) mkdir_umask=$umask,go-w;;
-        esac
-
         # With -d, create the new directory with the user-specified mode.
         # Otherwise, rely on $mkdir_umask.
         if test -n "$dir_arg"; then
@@ -326,52 +334,49 @@
         fi
 
         posix_mkdir=false
-        case $umask in
-          *[123567][0-7][0-7])
-            # POSIX mkdir -p sets u+wx bits regardless of umask, which
-            # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
-            ;;
-          *)
-            # Note that $RANDOM variable is not portable (e.g. dash);  Use it
-            # here however when possible just to lower collision chance.
-            tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
-
-            trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 
2>/dev/null; exit $ret' 0
-
-            # Because "mkdir -p" follows existing symlinks and we likely work
-            # directly in world-writeable /tmp, make sure that the '$tmpdir'
-            # directory is successfully created first before we actually test
-            # 'mkdir -p' feature.
-            if (umask $mkdir_umask &&
-                $mkdirprog $mkdir_mode "$tmpdir" &&
-                exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 
2>&1
-            then
-              if test -z "$dir_arg" || {
-                   # Check for POSIX incompatibilities with -m.
-                   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
-                   # other-writable bit of parent directory when it shouldn't.
-                   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
-                   test_tmpdir="$tmpdir/a"
-                   ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
-                   case $ls_ld_tmpdir in
-                     d????-?r-*) different_mode=700;;
-                     d????-?--*) different_mode=755;;
-                     *) false;;
-                   esac &&
-                   $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
-                     ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
-                     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
-                   }
-                 }
-              then posix_mkdir=:
-              fi
-              rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
-            else
-              # Remove any dirs left behind by ancient mkdir implementations.
-              rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
-            fi
-            trap '' 0;;
-        esac;;
+       # The $RANDOM variable is not portable (e.g., dash).  Use it
+       # here however when possible just to lower collision chance.
+       tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+
+       trap '
+         ret=$?
+         rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null
+         exit $ret
+       ' 0
+
+       # Because "mkdir -p" follows existing symlinks and we likely work
+       # directly in world-writeable /tmp, make sure that the '$tmpdir'
+       # directory is successfully created first before we actually test
+       # 'mkdir -p'.
+       if (umask $mkdir_umask &&
+           $mkdirprog $mkdir_mode "$tmpdir" &&
+           exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1
+       then
+         if test -z "$dir_arg" || {
+              # Check for POSIX incompatibilities with -m.
+              # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+              # other-writable bit of parent directory when it shouldn't.
+              # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+              test_tmpdir="$tmpdir/a"
+              ls_ld_tmpdir=`ls -ld "$test_tmpdir"`
+              case $ls_ld_tmpdir in
+                d????-?r-*) different_mode=700;;
+                d????-?--*) different_mode=755;;
+                *) false;;
+              esac &&
+              $mkdirprog -m$different_mode -p -- "$test_tmpdir" && {
+                ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"`
+                test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+              }
+            }
+         then posix_mkdir=:
+         fi
+         rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir"
+       else
+         # Remove any dirs left behind by ancient mkdir implementations.
+         rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null
+       fi
+       trap '' 0;;
     esac
 
     if
@@ -382,7 +387,7 @@
     then :
     else
 
-      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # mkdir does not conform to POSIX,
       # or it failed possibly due to a race condition.  Create the
       # directory the slow way, step by step, checking for races as we go.
 
@@ -411,7 +416,7 @@
           prefixes=
         else
           if $posix_mkdir; then
-            (umask=$mkdir_umask &&
+            (umask $mkdir_umask &&
              $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
             # Don't fail if two instances are running concurrently.
             test -d "$prefix" || exit 1
@@ -488,6 +493,13 @@
     then
       rm -f "$dsttmp"
     else
+      # If $backupsuffix is set, and the file being installed
+      # already exists, attempt a backup.  Don't worry if it fails,
+      # e.g., if mv doesn't support -f.
+      if test -n "$backupsuffix" && test -f "$dst"; then
+        $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+      fi
+
       # Rename the file to the real destination.
       $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
 
@@ -502,9 +514,9 @@
         # file should still install successfully.
         {
           test ! -f "$dst" ||
-          $doit $rmcmd -f "$dst" 2>/dev/null ||
+          $doit $rmcmd "$dst" 2>/dev/null ||
           { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
-            { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+            { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
           } ||
           { echo "$0: cannot unlink or rename $dst" >&2
             (exit 1); exit 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/src/Makefile.in 
new/arping-2.23/src/Makefile.in
--- old/arping-2.22/src/Makefile.in     2021-06-27 23:28:23.000000000 +0200
+++ new/arping-2.23/src/Makefile.in     2022-03-06 19:16:15.000000000 +0100
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.16.2 from Makefile.am.
+# Makefile.in generated by automake 1.16.3 from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994-2020 Free Software Foundation, Inc.
@@ -364,6 +364,7 @@
   bases='$(TEST_LOGS)'; \
   bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \
   bases=`echo $$bases`
+AM_TESTSUITE_SUMMARY_HEADER = ' for $(PACKAGE_STRING)'
 RECHECK_LOGS = $(TEST_LOGS)
 AM_RECURSIVE_TARGETS = check recheck
 TEST_SUITE_LOG = test-suite.log
@@ -796,7 +797,7 @@
          test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG);               \
        fi;                                                             \
        echo "$${col}$$br$${std}";                                      \
-       echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}";   \
+       echo "$${col}Testsuite summary"$(AM_TESTSUITE_SUMMARY_HEADER)"$${std}"; 
\
        echo "$${col}$$br$${std}";                                      \
        create_testsuite_report --maybe-color;                          \
        echo "$$col$$br$$std";                                          \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/src/arping.c new/arping-2.23/src/arping.c
--- old/arping-2.22/src/arping.c        2021-06-27 23:28:21.000000000 +0200
+++ new/arping-2.23/src/arping.c        2022-03-06 19:16:13.000000000 +0100
@@ -15,7 +15,7 @@
  *
  */
 /*
- *  Copyright (C) 2000-2019 Thomas Habets <tho...@habets.se>
+ *  Copyright (C) 2000-2022 Thomas Habets <tho...@habets.se>
  *
  *  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
@@ -109,6 +109,13 @@
 
 #if HAVE_SYS_CAPABILITY_H
 #include <sys/capability.h>
+#else
+// It seems that some environments have a libc with cap_init, but do not have
+// the header files. Without the header files we won't have the cap_t struct, 
so
+// it won't actually work.
+//
+// TODO: Probably this logic should be in configure.ac instead.
+#undef HAVE_CAP_INIT
 #endif
 
 #if HAVE_NET_BPF_H
@@ -116,6 +123,13 @@
 #endif
 #include <pcap.h>
 
+#if defined(HAVE_SECCOMP_H) && defined(HAVE_LIBSECCOMP)
+#define USE_SECCOMP 1
+#include <seccomp.h>
+#else
+#define USE_SECCOMP 0
+#endif
+
 #include "arping.h"
 
 #ifndef ETH_ALEN
@@ -192,6 +206,9 @@
 static int dupfound = 0;             /* set to 1 if dup found */
 static char lastreplymac[ETH_ALEN];  /* if last different from this then dup */
 
+/* -z to turn on, -Z to turn off. Default is compile time option */
+static int use_seccomp = DEFAULT_SECCOMP;
+
 unsigned int numsent = 0;                   /* packets sent */
 unsigned int numrecvd = 0;                  /* packets received */
 static unsigned int max_replies = UINT_MAX; /* exit after -C replies */
@@ -458,13 +475,80 @@
 #endif
 }
 
+#if USE_SECCOMP
+static void seccomp_allow(scmp_filter_ctx ctx, const char* name)
+{
+        if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, 
seccomp_syscall_resolve_name(name), 0)) {
+                if (verbose) {
+                        fprintf(stderr, "arping: seccomp_rule_add_exact(%s): 
%s",
+                                name, strerror(errno));
+                }
+        }
+}
+
+static void drop_seccomp(int libnet_fd)
+{
+        //scmp_filter_ctx ctx = seccomp_init(SCMP_ACT_ERRNO(13));
+        scmp_filter_ctx ctx = seccomp_init(SCMP_ACT_KILL);
+        if (!ctx) {
+                perror("seccomp_init()");
+                exit(1);
+        }
+
+        //
+        // Whitelist.
+        //
+
+        // Write to stdout and stderr.
+        if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(fstat), 1, 
SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO))) {
+                perror("seccomp_rule_add(fstat stdout)");
+                exit(1);
+        }
+        if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, 
SCMP_A0(SCMP_CMP_EQ, STDOUT_FILENO))) {
+                perror("seccomp_rule_add(write stdout)");
+                exit(1);
+        }
+        if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(write), 1, 
SCMP_A0(SCMP_CMP_EQ, STDERR_FILENO))) {
+                perror("seccomp_rule_add(write stderr)");
+                exit(1);
+        }
+
+        // Libnet.
+        if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(ioctl), 1, 
SCMP_A0(SCMP_CMP_EQ, libnet_fd))) {
+                perror("seccomp_rule_add(ioctl libnet)");
+                exit(1);
+        }
+        if (seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(sendto), 1, 
SCMP_A0(SCMP_CMP_EQ, libnet_fd))) {
+                perror("seccomp_rule_add(sendto libnet)");
+                exit(1);
+        }
+
+        // Other.
+        seccomp_allow(ctx, "select");
+        seccomp_allow(ctx, "pselect6");
+        seccomp_allow(ctx, "newfstatat");
+        seccomp_allow(ctx, "exit_group");
+        seccomp_allow(ctx, "rt_sigreturn");
+
+        // Load.
+        if (seccomp_load(ctx)) {
+                perror("seccomp_load()");
+                exit(1);
+        }
+        seccomp_release(ctx);
+        if (verbose > 1) {
+                printf("arping: Successfully applied seccomp policy\n");
+        }
+}
+#endif
+
 /**
  * drop even more privileges, where possible.
  *
  * After all setup is done and main loop is about to start.
  */
 static void
-drop_more_privileges()
+drop_more_privileges(int libnet_fd)
 {
 #ifdef HAVE_PLEDGE
         if (pledge("stdio tty", "")) {
@@ -475,8 +559,44 @@
                 printf("arping: Successfully pledged\n");
         }
 #endif
+#if USE_SECCOMP
+        if (use_seccomp) {
+                drop_seccomp(libnet_fd);
+        }
+#endif
 }
 
+/**
+ * Check for buggy libpcap version
+ * https://github.com/the-tcpdump-group/libpcap/issues/461
+ *
+ * This list is not authoritative.
+ *
+ * If it's over matching wrong the only impact *should* be that too many 
packets
+ * come through the BPF filter.
+ *
+ * If it's under-matching then replies with dot1p nonzero will not be seen.
+ */
+static int
+bug_pcap_vlan()
+{
+        const char* bad[] = {
+                // Broken in 1.7.0.
+                "libpcap version 1.7",
+                "libpcap version 1.8",
+                "libpcap version 1.9.0",
+                // Fixed in 1.9.1.
+                // Fixed in 1.10 and up.
+                NULL,
+        };
+        const char* v = pcap_lib_version();
+        for (const char** t = bad; *t; t++) {
+                if (!strncmp(v, *t, strlen(*t))) {
+                        return 1;
+                }
+        }
+        return 0;
+}
 
 /**
  * Do pcap_open_live(), except by using the pcap_create() interface
@@ -626,17 +746,48 @@
 
 /**
  * Init libnet with specified ifname. Destroy if already inited.
- * If this function retries with different parameter it will preserve
- * the original error message and print that.
+ *
+ * Libnet usually needs init before we have searched for the real
+ * interface. In that case, first we just give a NULL pointer as the
+ * interface. But libnet sometimes fails to find an interface (no idea
+ * why), so then we try to use "lo" and "lo0" explicitly.
+ *
+ * If even loopback fails, then it'll preserve the original error
+ * message.
+ *
  * Call with recursive=0.
  */
 void
-do_libnet_init(const char *ifname, int recursive)
+do_libnet_init(const char *inifname, int recursive)
 {
+        const char* ifname = inifname;
+        int last = 0;
+        switch (recursive) {
+        case 0:
+                break;
+        case 1:
+                ifname = "lo"; // E.g. Linux.
+                break;
+        case 2:
+                ifname = "lo0"; // E.g. OpenBSD.
+                break;
+        default:
+                last = 1;
+                break;
+        }
+
+        // If we're given an interface name then always use that.
+        // No need to be recursive about it.
+        if (inifname != NULL && recursive == 0) {
+                ifname = inifname;
+                last = 1;
+        }
+
        char ebuf[LIBNET_ERRBUF_SIZE];
         ebuf[0] = 0;
        if (verbose > 1) {
-                printf("arping: libnet_init(%s)\n", ifname ? ifname : 
"<null>");
+                printf("arping: trying libnet_init(LIBNET_LINK, %s)\n",
+                       ifname ? ifname : "<null>");
        }
        if (libnet) {
                /* Probably going to switch interface from temp to real. */
@@ -644,28 +795,31 @@
                libnet = 0;
        }
 
-        /* Try libnet_init() even though we aren't root. We may have
+        /* Try libnet_init() even though we maybe aren't root. We may have
          * a capability or something. */
        if (!(libnet = libnet_init(LIBNET_LINK,
                                   (char*)ifname,
                                   ebuf))) {
                 strip_newline(ebuf);
-                if (!ifname) {
-                        /* Sometimes libnet guesses an interface that it then
-                         * can't use. Work around that by attempting to
-                         * use "lo". */
-                        do_libnet_init("lo", 1);
+                if (verbose) {
+                        fprintf(stderr,
+                                "arping: libnet_init(LIBNET_LINK, %s): %s\n",
+                                ifname ? ifname : "<null>",
+                                *ebuf ? ebuf : "<no error message>");
+                }
+                if (!last) {
+                        do_libnet_init(ifname, recursive+1);
                         if (libnet != NULL) {
                                 return;
                         }
-                } else if (recursive) {
-                        /* Continue original execution to get that
-                         * error message. */
-                        return;
                 }
-                fprintf(stderr, "arping: libnet_init(LIBNET_LINK, %s): %s\n",
-                        ifname ? ifname : "<null>",
-                        *ebuf ? ebuf : "<no error message>");
+                if (!verbose) {
+                        // Prevent double-print when verbose.
+                        fprintf(stderr,
+                                "arping: libnet_init(LIBNET_LINK, %s): %s\n",
+                                ifname ? ifname : "<null>",
+                                *ebuf ? ebuf : "<no error message>");
+                }
                 if (getuid() && geteuid()) {
                         fprintf(stderr,
                                 "arping: you may need to run as root\n");
@@ -790,9 +944,16 @@
               "    -U     Send unsolicited ARP.\n"
               "    -v     Verbose output. Use twice for more messages.\n"
                "    -V num 802.1Q tag to add. Defaults to no VLAN tag.\n"
-               "    -w sec Specify a timeout before ping exits regardless of 
how"
-               " many\npackets have been sent or received.\n"
-               "    -W sec Time to wait between pings.\n");
+               "    -w sec Specify a timeout before ping exits regardless of 
how many\n"
+               "           packets have been sent or received.\n"
+               "    -W sec Time to wait between pings.\n"
+#if USE_SECCOMP
+               "    -z     Enable seccomp%s\n"
+               "    -Z     Disable seccomp%s\n",
+               DEFAULT_SECCOMP ? " (default)" : "",
+               DEFAULT_SECCOMP ? "" : " (default)"
+#endif
+               );
         printf("Report bugs to: tho...@habets.se\n"
                "Arping home page: <http://www.habets.pp.se/synscan/>\n"
                "Development repo: http://github.com/ThomasHabets/arping\n";);
@@ -806,7 +967,7 @@
 {
        printf("ARPing %s, by Thomas Habets <tho...@habets.se>\n",
               version);
-        printf("usage: arping [ -0aAbdDeFpPqrRuUv ] [ -w <sec> ] "
+        printf("usage: arping [ -0aAbdDeFpPqrRuUv%s ] [ -w <sec> ] "
                "[ -W <sec> ] "
                "[ -S <host/ip> ]\n"
                "              "
@@ -817,7 +978,7 @@
                " [ -g <group> ]\n"
                "              "
                "[ -V <vlan> ] [ -Q <priority> ] "
-               "<host/ip/MAC | -B>\n");
+               "<host/ip/MAC | -B>\n", USE_SECCOMP ? "zZ" : "");
 }
 
 /**
@@ -837,6 +998,19 @@
 }
 
 /**
+ *
+ */
+static void
+print_library_versions()
+{
+        fprintf(stderr, "arping: %s\n", pcap_lib_version());
+        if (bug_pcap_vlan()) {
+                fprintf(stderr, "arping: bug: 
https://github.com/the-tcpdump-group/libpcap/issues/461\n";);
+        }
+        fprintf(stderr, "arping: %s\n", libnet_version());
+}
+
+/**
  * Check to see if it looks somewhat like a MAC address.
  *
  * It was unclear from msdn.microsoft.com if their scanf() supported
@@ -1125,7 +1299,7 @@
                                           send_reply ? ARPOP_REPLY : 
ARPOP_REQUEST,
                                          srcmac,
                                          (uint8_t*)&srcip,
-                                         unsolicited ? (uint8_t*)ethxmas : 
(uint8_t*)ethnull,
+                                         unsolicited ? (uint8_t*)ethxmas : 
(send_reply ? dstmac : (uint8_t*)ethnull),
                                          (uint8_t*)&dstip,
                                          (uint8_t*)padding,
                                          sizeof padding,
@@ -1188,7 +1362,7 @@
 pingip_recv(const char *unused, struct pcap_pkthdr *h, const char * const 
packet)
 {
         const unsigned char *pkt_srcmac;
-        const struct libnet_802_1q_hdr *veth;
+        const struct libnet_802_1q_hdr *veth = NULL;
        struct libnet_802_3_hdr *heth;
        struct libnet_arp_hdr *harp;
         struct timespec arrival;
@@ -1201,28 +1375,57 @@
         getclock(&arrival);
 
        if (vlan_tag >= 0) {
+                if (h->caplen < LIBNET_802_1Q_H + LIBNET_ARP_H + 2*(ETH_ALEN + 
4)) {
+                        return;
+                }
                veth = (void*)packet;
                harp = (void*)((char*)veth + LIBNET_802_1Q_H);
                pkt_srcmac = veth->vlan_shost;
        } else {
-                // Short packet.
                 if (h->caplen < LIBNET_ETH_H + LIBNET_ARP_H + 2*(ETH_ALEN + 
4)) {
                         return;
                 }
-
                heth = (void*)packet;
                harp = (void*)((char*)heth + LIBNET_ETH_H);
                pkt_srcmac = heth->_802_3_shost;
-                // Wrong length of hardware address.
-                if (harp->ar_hln != ETH_ALEN) {
+        }
+        if (verbose > 3) {
+                printf("arping: ... good length\n");
+        }
+
+        if (veth) {
+                if (veth->vlan_tpi != htons(0x8100)) {
                         return;
                 }
-
-                // Wrong length of protocol address.
-                if (harp->ar_pln != 4) {
+                if (verbose > 3) {
+                        printf("arping: ... is dot1q\n");
+                }
+                if ((veth->vlan_priority_c_vid & 0xfff) == vlan_tag) {
                         return;
                 }
-       }
+                if (verbose > 3) {
+                        printf("arping: ... right VLAN\n");
+                }
+        }
+
+        // Not checking ethertype because in theory this could be used for
+        // Ethernet II.
+
+        // Wrong length of hardware address.
+        if (harp->ar_hln != ETH_ALEN) {
+                return;
+        }
+        if (verbose > 3) {
+                printf("arping: ... L2 addr len is correct\n");
+        }
+
+        // Wrong length of protocol address.
+        if (harp->ar_pln != 4) {
+                return;
+        }
+        if (verbose > 3) {
+                printf("arping: ... L3 addr len is correct\n");
+        }
 
         // ARP reply.
         if (htons(harp->ar_op) != ARPOP_REPLY) {
@@ -1365,7 +1568,7 @@
 {
         const unsigned char *pkt_dstmac;
         const unsigned char *pkt_srcmac;
-        const struct libnet_802_1q_hdr *veth;
+        const struct libnet_802_1q_hdr *veth = NULL;
        struct libnet_802_3_hdr *heth;
        struct libnet_ipv4_hdr *hip;
        struct libnet_icmpv4_hdr *hicmp;
@@ -1379,18 +1582,45 @@
         getclock(&arrival);
 
         if (vlan_tag >= 0) {
+                if (h->caplen < LIBNET_ETH_H + LIBNET_IPV4_H + 
LIBNET_ICMPV4_H) {
+                        return;
+                }
                 veth = (void*)packet;
                 hip = (void*)((char*)veth + LIBNET_802_1Q_H);
                 hicmp = (void*)((char*)hip + LIBNET_IPV4_H);
                 pkt_srcmac = veth->vlan_shost;
                 pkt_dstmac = veth->vlan_dhost;
         } else {
+                if (h->caplen < LIBNET_ETH_H + LIBNET_ARP_H + LIBNET_ICMPV4_H) 
{
+                        return;
+                }
                 heth = (void*)packet;
                 hip = (void*)((char*)heth + LIBNET_ETH_H);
                 hicmp = (void*)((char*)hip + LIBNET_IPV4_H);
                 pkt_srcmac = heth->_802_3_shost;
                 pkt_dstmac = heth->_802_3_dhost;
         }
+        if (verbose > 3) {
+                printf("arping: ... good length\n");
+        }
+
+        if (veth) {
+                if (veth->vlan_tpi != htons(0x8100)) {
+                        return;
+                }
+                if (verbose > 3) {
+                        printf("arping: ... is dot1q\n");
+                }
+                if ((veth->vlan_priority_c_vid & 0xfff) == vlan_tag) {
+                        return;
+                }
+                if (verbose > 3) {
+                        printf("arping: ... right VLAN\n");
+                }
+        }
+
+        // Not checking ethertype because in theory this could be used for
+        // Ethernet II.
 
         // Dest MAC must be me.
         if (memcmp(pkt_dstmac, srcmac, ETH_ALEN)) {
@@ -1641,7 +1871,6 @@
                               break;
                       }
               }
-
               if (trydispatch) {
                       int ret;
                        if (0 > (ret = pcap_dispatch(pcap, -1,
@@ -1722,7 +1951,7 @@
        memcpy(dstmac, ethxmas, ETH_ALEN);
 
         while (EOF != (c = getopt(argc, argv,
-                                  
"0aAbBC:c:dDeFg:hi:I:m:pPqQ:rRs:S:t:T:uUvV:w:W:"))) {
+                                  
"0aAbBC:c:dDeFg:hi:I:m:pPqQ:rRs:S:t:T:uUvV:w:W:zZ"))) {
                switch(c) {
                case '0':
                        srcip_opt = "0.0.0.0";
@@ -1850,6 +2079,12 @@
                 case 'W':
                         packetwait = (unsigned)(1000000.0 * atof(optarg));
                         break;
+                case 'z':
+                        use_seccomp = 1;
+                        break;
+                case 'Z':
+                        use_seccomp = 0;
+                        break;
                default:
                        usage(1);
                }
@@ -1862,6 +2097,10 @@
                 exit(1);
         }
 
+        if (verbose > 2) {
+                print_library_versions();
+        }
+
         // Generate random payload suffix for MAC pings, to be able to
         // differentiate from unrelated ping replies.
         if (payload_suffix_size < 0) {
@@ -2022,6 +2261,9 @@
         * libnet init (may be done already for resolving)
         */
         do_libnet_init(ifname, 0);
+        if (verbose > 1) {
+                printf("arping: libnet_getfd(): %d\n", libnet_getfd(libnet));
+        }
 
        /*
         * Make sure dstip and parm like eachother
@@ -2143,9 +2385,14 @@
        }
 #endif
 
+        if (vlan_tag >= 0 && bug_pcap_vlan() && verbose) {
+                fprintf(stderr,
+                        "arping: Working around bug in libpcap 1.7-1.9.0.\n");
+        }
+
        if (mode == PINGIP) {
                /* FIXME: better filter with addresses? */
-                if (vlan_tag >= 0) {
+                if (vlan_tag >= 0 && !bug_pcap_vlan()) {
                         snprintf(bpf_filter, sizeof(bpf_filter),
                                  "vlan %u and arp", vlan_tag);
                 } else {
@@ -2158,7 +2405,7 @@
                }
        } else { /* ping mac */
                /* FIXME: better filter with addresses? */
-                if (vlan_tag >= 0) {
+                if (vlan_tag >= 0 && !bug_pcap_vlan()) {
                         snprintf(bpf_filter, sizeof(bpf_filter),
                                  "vlan %u and icmp", vlan_tag);
                 } else {
@@ -2208,7 +2455,7 @@
                        format_mac(srcmac, buf, sizeof(buf)));
        }
 
-        drop_more_privileges();
+        drop_more_privileges(libnet_getfd(libnet));
 
        if (display == NORMAL) {
                printf("ARPING %s\n", parm);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/src/windows.c 
new/arping-2.23/src/windows.c
--- old/arping-2.22/src/windows.c       2021-06-27 23:28:21.000000000 +0200
+++ new/arping-2.23/src/windows.c       2022-03-06 19:16:13.000000000 +0100
@@ -54,7 +54,7 @@
        while (!done && !time_to_die) {
               struct pcap_pkthdr *pkt_header;
               u_char *pkt_data;
-              if (pcap_next_ex(pcap, &pkt_header, &pkt_data) == 1) {
+              if (pcap_next_ex(pcap, &pkt_header, &pkt_data) > 0) {
                       func(pcap, pkt_header, pkt_data);
               }
                getclock(&tv);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/arping-2.22/test-driver new/arping-2.23/test-driver
--- old/arping-2.22/test-driver 2021-06-27 23:28:23.000000000 +0200
+++ new/arping-2.23/test-driver 2022-03-06 19:16:15.000000000 +0100
@@ -42,11 +42,13 @@
 {
   cat <<END
 Usage:
-  test-driver --test-name=NAME --log-file=PATH --trs-file=PATH
-              [--expect-failure={yes|no}] [--color-tests={yes|no}]
-              [--enable-hard-errors={yes|no}] [--]
+  test-driver --test-name NAME --log-file PATH --trs-file PATH
+              [--expect-failure {yes|no}] [--color-tests {yes|no}]
+              [--enable-hard-errors {yes|no}] [--]
               TEST-SCRIPT [TEST-SCRIPT-ARGUMENTS]
+
 The '--test-name', '--log-file' and '--trs-file' options are mandatory.
+See the GNU Automake documentation for information.
 END
 }
 

Reply via email to