From: Sophie Brun <sophie@kali.org>
Date: Mon, 21 Dec 2020 15:18:23 +0100
Subject: Fix test failure

Do not test if interface is not available (case of ipv6 only machine)

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=976712
---
 misc/pcap_tests.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/misc/pcap_tests.c b/misc/pcap_tests.c
index 42edd03..fbc43be 100644
--- a/misc/pcap_tests.c
+++ b/misc/pcap_tests.c
@@ -152,8 +152,10 @@ Ensure (pcap, routethrough_src_globalsource_set)
   interface = routethrough (&dst, &src);
   /* dependent on local environment */
   // assert_that ((interface = routethrough (&dst, &src)), is_not_null);
-  assert_that (interface, is_not_equal_to_string ("lo"));
-  assert_that ((src.s_addr != INADDR_ANY));
+  if (interface != NULL) {
+    assert_that (interface, is_not_equal_to_string ("lo"));
+    assert_that ((src.s_addr != INADDR_ANY));
+  }
   g_socket_use_real = true;
 }
 
