summaryrefslogtreecommitdiffstats
path: root/plugins/netutils.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/netutils.c')
-rw-r--r--plugins/netutils.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/netutils.c b/plugins/netutils.c
index db64ef09..08245276 100644
--- a/plugins/netutils.c
+++ b/plugins/netutils.c
@@ -291,6 +291,13 @@ is_host (const char *address)
291 return (FALSE); 291 return (FALSE);
292} 292}
293 293
294void
295host_or_die(const char *str)
296{
297 if(!str || (!is_addr(str) && !is_hostname(str)))
298 usage_va(_("Invalid hostname/address - %s"), str);
299}
300
294int 301int
295is_addr (const char *address) 302is_addr (const char *address)
296{ 303{