t/h/L/vif-common.sh: fix handle_iptable return value
authorHans van Kranenburg <hans@knorrie.org>
Thu, 26 Nov 2020 15:06:03 +0000 (16:06 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Fri, 4 Nov 2022 19:25:46 +0000 (19:25 +0000)
A return statement without explicit value will return the value of the
last command executed before this line with return was encountered.

This is not what we want. return 0.

Closes: #955994
Fixes: 2e0814f971dd ("vif-common: disable handle_iptable")
Reported-by: Samuel Thibault <sthibault@debian.org>
Signed-off-by: Hans van Kranenburg <hans@knorrie.org>
Gbp-Pq: Name 0026-t-h-L-vif-common.sh-fix-handle_iptable-return-value.patch

tools/hotplug/Linux/vif-common.sh

index 14cd44c270626e57b9af343481e15d79377e4f50..99ff1baaa6361e651fd2e14eb90565d9823c1993 100644 (file)
@@ -183,7 +183,7 @@ frob_iptable()
 handle_iptable()
 {
   # This function is disabled in Debian packaging. See Debian bug #894013.
-  return
+  return 0
 
   # Check for a working iptables installation.  Checking for the iptables
   # binary is not sufficient, because the user may not have the appropriate