-# $OpenBSD: Makefile,v 1.6 2016/03/30 11:09:56 bluhm Exp $
+# $OpenBSD: Makefile,v 1.7 2016/07/18 09:09:24 bluhm Exp $
# The following ports must be installed:
#
@echo fill out these variables for additional tests
.endif
+.if ! empty (REMOTE_SSH)
+.if make (regress) || make (all)
+.BEGIN: pf.conf addr.py
+ @echo
+ ${SUDO} true
+ ssh -t ${REMOTE_SSH} ${SUDO} true
+.endif
+.endif
+
depend: addr.py
# Create python include file containing the addresses.
clean-arp:
@echo '\n======== $@ ========'
${SUDO} arp -da
- ssh -t ${REMOTE_SSH} ${SUDO} arp -da
+ ssh ${REMOTE_SSH} ${SUDO} arp -da
# Clear ARP cache and ping all addresses. This ensures that
# the IP addresses are configured and all routing table are set up
run-regress-arp-multicast: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request and overwrite entry with multicast ethernet
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
- ssh -t ${REMOTE_SSH} ${SUDO} arp -s ${LOCAL_ADDR} ${LOCAL_MAC} temp
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${LOCAL_ADDR} ${LOCAL_MAC} temp
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_multicast.py
scp ${REMOTE_SSH}:/var/log/messages new.log
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${LOCAL_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${LOCAL_ADDR}
diff old.log new.log | grep '^> ' >diff.log
grep 'bsd: arp info overwritten for ${LOCAL_ADDR} by 33:33:33:33:33:33' diff.log
grep '^${LOCAL_ADDR} .* 33:33:33:33:33:33 ' arp.log
run-regress-arp-broadcast: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request with broadcast as sender hardware address
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_broadcast.py
scp ${REMOTE_SSH}:/var/log/messages new.log
run-regress-arp-announcement: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Announcement for existing address
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_announcement.py
scp ${REMOTE_SSH}:/var/log/messages new.log
run-regress-arp-gratuitous: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send Gratuitous ARP for existing address
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_gratuitous.py
scp ${REMOTE_SSH}:/var/log/messages new.log
run-regress-arp-permanent: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request to change permanent fake address
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
- ssh -t ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${FAKE_MAC} permanent
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${FAKE_MAC} permanent
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_fake.py
scp ${REMOTE_SSH}:/var/log/messages new.log
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
diff old.log new.log | grep '^> ' >diff.log
grep 'bsd: arp: attempt to overwrite permanent entry for ${FAKE_ADDR} by ${LOCAL_MAC}' diff.log
grep '^${FAKE_ADDR} .* ${FAKE_MAC} .* permanent * $$' arp.log
run-regress-arp-address: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request to change address on other interface
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_other.py
scp ${REMOTE_SSH}:/var/log/messages new.log
run-regress-arp-temporary: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request to change temporary entry on other interface
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
- ssh -t ${REMOTE_SSH} ${SUDO} arp -s ${OTHERFAKE_ADDR} ${FAKE_MAC} temp
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${OTHERFAKE_ADDR} ${FAKE_MAC} temp
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_otherfake.py
scp ${REMOTE_SSH}:/var/log/messages new.log
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
diff old.log new.log | grep '^> ' >diff.log
grep 'bsd: arp: attempt to overwrite entry for ${OTHERFAKE_ADDR} on .* by ${LOCAL_MAC} on .*' diff.log
grep '^${OTHERFAKE_ADDR} .* ${FAKE_MAC} ' arp.log
run-regress-arp-incomplete: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request filling an incomplete entry on other interface
- ssh -t ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
- ssh -t ${REMOTE_SSH} ${SUDO} ping -n -w 1 -c 1 ${OTHERFAKE_ADDR} || true
+ ssh ${REMOTE_SSH} logger -t "arp-regress[$$$$]" $@
+ ssh ${REMOTE_SSH} ${SUDO} ping -n -w 1 -c 1 ${OTHERFAKE_ADDR} || true
scp ${REMOTE_SSH}:/var/log/messages old.log
${SUDO} ${PYTHON}arp_otherfake.py
scp ${REMOTE_SSH}:/var/log/messages new.log
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
diff old.log new.log | grep '^> ' >diff.log
grep 'bsd: arp: attempt to add entry for ${OTHERFAKE_ADDR} on .* by ${LOCAL_MAC} on .*' diff.log
grep '^${OTHERFAKE_ADDR} .* (incomplete) ' arp.log
run-regress-arp-proxy: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request for fake address that is proxied
- ssh -t ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${PROXY_MAC}
- ssh -t ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${FAKE_MAC} pub
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${PROXY_MAC}
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${FAKE_MAC} pub
${SUDO} ${PYTHON}arp_proxy.py
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
grep '^${FAKE_ADDR} .* ${FAKE_MAC} .* static * p$$' arp.log
# Enter a static ARP entry on the remote machine for a fake address,
run-regress-arp-nonproxy: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request for fake address that is not published
- ssh -t ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${FAKE_MAC}
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${FAKE_ADDR} ${FAKE_MAC}
${SUDO} ${PYTHON}arp_nonproxy.py
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${FAKE_ADDR}
grep '^${FAKE_ADDR} .* ${FAKE_MAC} .* static * $$' arp.log
# Publish a proxy ARP entry on the remote machine for a fake address
run-regress-arp-otherproxy: addr.py clean-arp
@echo '\n======== $@ ========'
@echo Send ARP Request for address proxied on another interface
- ssh -t ${REMOTE_SSH} ${SUDO} arp -s ${OTHERFAKE_ADDR} ${FAKE_MAC} pub
+ ssh ${REMOTE_SSH} ${SUDO} arp -s ${OTHERFAKE_ADDR} ${FAKE_MAC} pub
${SUDO} ${PYTHON}arp_otherproxy.py
ssh ${REMOTE_SSH} ${SUDO} arp -an >arp.log
- ssh -t ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
+ ssh ${REMOTE_SSH} ${SUDO} arp -d ${OTHERFAKE_ADDR}
grep '^${OTHERFAKE_ADDR} .* ${FAKE_MAC} .* static * p$$' arp.log
REGRESS_TARGETS = ${TARGETS:S/^/run-regress-/}