diff options
author | Cedric Berger <cedric@cvs.openbsd.org> | 2003-03-06 14:22:14 +0000 |
---|---|---|
committer | Cedric Berger <cedric@cvs.openbsd.org> | 2003-03-06 14:22:14 +0000 |
commit | 03c4268bd034356d632ce80ac8485ec25c8c2c85 (patch) | |
tree | 11698c9cbeb3d88985fc147beb7cc1b48792a9bf /sbin/isakmpd | |
parent | a1039563ca663d0037e7b06f60291f0edd48d670 (diff) |
fix text2sockaddr() when HAVE_GETNAMEINFO is false and port is NULL.
ok ho@
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/util.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sbin/isakmpd/util.c b/sbin/isakmpd/util.c index 9181d6b4547..4233356ebdf 100644 --- a/sbin/isakmpd/util.c +++ b/sbin/isakmpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.30 2003/03/06 09:56:25 ho Exp $ */ +/* $OpenBSD: util.c,v 1.31 2003/03/06 14:22:13 cedric Exp $ */ /* $EOM: util.c,v 1.23 2000/11/23 12:22:08 niklas Exp $ */ /* @@ -291,6 +291,8 @@ text2sockaddr (char *address, char *port, struct sockaddr **sa) free (*sa); return -1; } + if (!port) + return 0; sp = getservbyname (port, "udp"); if (!sp) { |