-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Write localhost into pfresolved config. Wait until pfresolved creates table regress-pfresolved. Read IP addresses from pf table with pfctl. Check that pfresolved added 127.0.0.1 and ::1. Check that table contains 127.0.0.1 and ::1.
- Loading branch information
1 parent
bd432b8
commit fffb702
Showing
3 changed files
with
36 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Write localhost into pfresolved config. | ||
# Wait until pfresolved creates table regress-pfresolved. | ||
# Read IP addresses from pf table with pfctl. | ||
# Check that pfresolved added 127.0.0.1 and ::1. | ||
# Check that table contains 127.0.0.1 and ::1. | ||
|
||
use strict; | ||
use warnings; | ||
|
||
our %args = ( | ||
pfresolved => { | ||
address_list => [qw(localhost.)], # must resolve A and AAAA | ||
loggrep => { | ||
qr{added: 127.0.0.1/32,} => 1, | ||
qr{added: ::1/128,} => 1, | ||
}, | ||
}, | ||
pfctl => { | ||
updates => 3, | ||
loggrep => { | ||
qr/^ 127.0.0.1$/ => 1, | ||
qr/^ ::1$/ => 1, | ||
}, | ||
}, | ||
); | ||
|
||
1; |