Skip to content

Commit

Permalink
feat: ✅ support 'any' address as source or destination
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshihiro503 committed Jun 26, 2024
1 parent 0de2f2c commit bfa6448
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions bin/addressBook.ml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ let of_string s =
| Ok ip -> SingleHost ip
| Error _ -> of_cidr s

let mk_book assoc =
("any", of_string "8.8.8.8") :: assoc

let dump t =
let item = function
| SingleHost addr -> !%"Single '%s'" (Ip.to_string addr)
Expand Down
1 change: 1 addition & 0 deletions bin/reader.ml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ let address_book_of_xmls address_entries address_grps =
in
List.map address_of_xml address_entries
@ List.map group_of_xml address_grps
|> AddressBook.mk_book

let read_rules xml =
let rule_of_entry entry =
Expand Down

0 comments on commit bfa6448

Please sign in to comment.