X-Git-Url: https://git.distorted.org.uk/~mdw/firewall/blobdiff_plain/cd97af80b48a2a208609a5f8e221cd4d8c6a5d04..183dccdc8d5a96039eb838f5afe3bcc82c24d781:/functions.m4 diff --git a/functions.m4 b/functions.m4 index 3de471e..89715a4 100644 --- a/functions.m4 +++ b/functions.m4 @@ -513,14 +513,19 @@ host () { defhost () { host=$1 addword allhosts $host - eval host_type_$host=endsys + eval host_type_$host=server } -## router +## hosttype TYPE ## -## Declare the host to be a router, so it should forward packets and so on. -router () { - eval host_type_$host=router +## Declare the host to have the given type. +hosttype () { + type=$1 + case $type in + router | server | client) ;; + *) echo >&2 "$0: bad host type \`$type'"; exit 1 ;; + esac + eval host_type_$host=$type } ## iface IFACE NET ...