]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
addrfilt: explicitly handle unexpected addresses
authorMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Feb 2020 07:53:11 +0000 (08:53 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Tue, 18 Feb 2020 15:01:25 +0000 (16:01 +0100)
addrfilt.c

index dd1670035194ecd10f2ec5885eecd1855f1e2cf2..6208b4614cfff69dc82cd851ca3bb1f8ea21739f 100644 (file)
@@ -247,6 +247,8 @@ set_subnet_(ADF_AuthTable table,
           set_subnet(&table->base6, ip6, 4, 0, new_state, delete_children) == ADF_SUCCESS)
         return ADF_SUCCESS;
       break;
+    default:
+      break;
   }
 
   return ADF_BADSUBNET;
@@ -359,9 +361,9 @@ ADF_IsAllowed(ADF_AuthTable table,
     case IPADDR_INET6:
       split_ip6(ip_addr, ip6);
       return check_ip_in_node(&table->base6, ip6);
+    default:
+      return 0;
   }
-
-  return 0;
 }
 
 /* ================================================== */