La roulette a la priorité sur tout.

This commit is contained in:
Hugo Levy-Falk 2020-01-20 11:26:04 +01:00 committed by root
parent 9a840b8554
commit 44ed75a4ad
2 changed files with 4 additions and 4 deletions

View file

@ -42,12 +42,12 @@ table inet firewall {
# Politique par défaut : tout jeter.
policy accept
# Applique la politique globale
jump global
# La roulette pour les n1as
jump roulette
# Applique la politique globale
jump global
# Passage par le checkmac pour les concernés
# jump checkmac

View file

@ -36,7 +36,6 @@ api_hostname = CONFIG.get('Re2o', 'hostname')
api_password = CONFIG.get('Re2o', 'password')
api_username = CONFIG.get('Re2o', 'username')
api_client = Re2oAPIClient(api_hostname, api_username, api_password)
def gen_ip_mac_set():
@ -45,6 +44,7 @@ def gen_ip_mac_set():
Returns:
A NetfilterSet object with the allowed ip - mac pairs.
"""
api_client = Re2oAPIClient(api_hostname, api_username, api_password)
hosts = api_client.list('dhcp/hostmacip')
content = [
(h['ipv4'], h['mac_address'])