~samiam/MaraDNS

ref: 3.5.0021 MaraDNS/deadwood-github/sqa/dwood2rc_d_upstream_servers/do.test -rwxr-xr-x 1.2 KiB
ca00f282 — Sam Trenholme MaraDNS release 3.5.0021 9 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/sh

# This is a basic Deadwood test to make sure it works

killall maradns > /dev/null 2>&1 # Don't run this test on Solaris
sleep 2

for IP in 127.0.0.2 127.0.0.4 127.0.0.6 ; do
cat > mararc-${IP} << EOF
chroot_dir="$( pwd )"
ipv4_bind_addresses="${IP}"
csv2 = {}
csv2["example.com."] = "db.example.com"
csv2["example.net."] = "db.example.net"
EOF

cat > db.example.com << EOF
*.% A 10.1.2.3
EOF

cat > db.example.net << EOF
*.% A 10.1.2.4
EOF

# OK, test the server
../../../server/maradns -f mararc-${IP} > /dev/null 2>&1 &
#../../../server/maradns -f mararc-${IP} &
sleep 1

done

# Now, make sure Deadwood works

cat > dwood2rc << EOF
chroot_dir="$( pwd )"
ipv4_bind_addresses="127.0.0.1"
upstream_servers = {}
upstream_servers["."]="127.0.0.2"
upstream_servers["example.net."]="127.0.0.6"
recursive_acl="127.0.0.1/16"
filter_rfc1918 = 0
EOF

../../src/Deadwood -f dwood2rc | grep -v version | sed 's/[(].*[)]//' &
sleep 1
askmara Awww1.example.com. 127.0.0.1 | sed 's/86399/86400/'
echo
askmara Awww1.example.com. 127.0.0.1 | sed 's/86399/86400/'
echo
askmara Awww2.example.com. 127.0.0.1 | sed 's/86399/86400/'
echo
askmara Awww1.example.net. 127.0.0.1 | sed 's/86399/86400/'

killall maradns
killall Deadwood
rm mararc-*
rm db.example.com
rm dwood2rc