diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-05 19:20:36 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2023-11-05 19:20:36 +0100 |
commit | e7a55058fc77f04d1e1bb63cd09894278c312376 (patch) | |
tree | 928447dc621a4f267f1b89a7cf90f93c52bf7c05 | |
parent | a12ed313973d16f756627cdb4702e5666b17cb00 (diff) | |
download | prolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.tar.gz prolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.tar.bz2 prolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.tar.xz prolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.zip |
wip
-rw-r--r-- | 4.pl | 18 |
1 files changed, 5 insertions, 13 deletions
@@ -42,19 +42,11 @@ bgp_connection(H, R) :- router_link(H, _, R), router_link(R, _, H). -% warnings(Msg) :- -% host(H), host(R), -% router_link(H, R, _), -% not router_link(R, H, _), -% Msg = "missing router link!". - -% bgp_connection(H, Remote)? - -% wg_if(H, R, PK) :- bgp_connection(H, R), public_key(R, PK). -% % wg_if(H, R, PK)? -% wg_if_allowed_ips(H, Ip, 128) :- bgp_connection(H, R), router_link(H, R, Ip). -% wg_if_allowed_ips(H, Ip, Range) :- bgp_connection(H, R), attached_network(R, Ip, Range). -% % wg_if_allowed_ips(H, Ip, Range)? +warning(Msg) :- + host(H), host(R), + router_link(H, _, R), + \+ router_link(R, _, H), + format(string(Msg), "Missing router_link from ~w to ~w", [R, H]). bgp_connections(H, Cs) :- findall(Name, bgp_connection(H, Name), Cs). |