diff --git a/mac_ip.py b/mac_ip.py index 82d1ed4..fa89855 100644 --- a/mac_ip.py +++ b/mac_ip.py @@ -46,10 +46,12 @@ def gen_ip_mac_set(): """ api_client = Re2oAPIClient(api_hostname, api_username, api_password) hosts = api_client.list('dhcp/hostmacip') + for h in hosts: + print(h) content = [ (h['ipv4'], h['mac_address']) for h in hosts - if h['ipv4'] and h['mac_address'] + if 'ipv4' in h and h['ipv4'] and h['mac_address'] ] return NetfilterSet( target_content=content, diff --git a/roulette.nft b/roulette.nft index 6a4ef6e..97e85d0 100644 --- a/roulette.nft +++ b/roulette.nft @@ -23,7 +23,9 @@ table inet firewall { type ipv4_addr elements = { 10.7.0.4, - 92.242.132.24 + 92.242.132.24, + 104.28.28.23, + 104.28.29.23 } }