]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - send_common.c
sender: Deplete ACLs on exit.
[paraslash.git] / send_common.c
index 2088c8b4de2947c94c238b41a471c2ecb89914d5..3e8a7c0dc85049dcfc52a5982083a69d3e1babc6 100644 (file)
@@ -218,6 +218,22 @@ void generic_com_allow(struct sender_command_data *scd,
        acl_allow(scd->host, scd->netmask, &ss->acl, ss->default_deny);
 }
 
+/**
+ * Empty the access control list of a sender.
+ *
+ * \param acl The access control list of the sender.
+ *
+ * This is called from the ->shutdown methods of the http and the dccp sender.
+ */
+void generic_acl_deplete(struct list_head *acl)
+{
+       /*
+        * Since default_deny is false, the ACL is considered a blacklist. A
+        * netmask of zero matches any IP address, so this call empties the ACL.
+        */
+       acl_allow("0.0.0.0", 0 /* netmask */, acl, 0 /* default_deny */);
+}
+
 /**
  * Deny connections from the given range of IP addresses.
  *