summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2023-11-05 19:20:36 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2023-11-05 19:20:36 +0100
commite7a55058fc77f04d1e1bb63cd09894278c312376 (patch)
tree928447dc621a4f267f1b89a7cf90f93c52bf7c05
parenta12ed313973d16f756627cdb4702e5666b17cb00 (diff)
downloadprolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.tar.gz
prolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.tar.bz2
prolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.tar.xz
prolog-firewall-e7a55058fc77f04d1e1bb63cd09894278c312376.zip
wip
-rw-r--r--4.pl18
1 files changed, 5 insertions, 13 deletions
diff --git a/4.pl b/4.pl
index 4d43142..eb355b6 100644
--- a/4.pl
+++ b/4.pl
@@ -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).