summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-04-04 18:40:46 +0000
committerHans-Joerg Hoexer <hshoexer@cvs.openbsd.org>2005-04-04 18:40:46 +0000
commitb29d0a3488227c28d72f131ed2d25548b1147be5 (patch)
treec6089215f507097191f8d0e797d14e87268cfec9 /sbin
parent84e8637005b00999db75aac08510544d9b1d6f94 (diff)
fix byteorder confusion
ok cloder ho
Diffstat (limited to 'sbin')
-rw-r--r--sbin/isakmpd/ipsec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sbin/isakmpd/ipsec.c b/sbin/isakmpd/ipsec.c
index 220a7aabe41..724640c373c 100644
--- a/sbin/isakmpd/ipsec.c
+++ b/sbin/isakmpd/ipsec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ipsec.c,v 1.108 2005/03/29 04:51:21 cloder Exp $ */
+/* $OpenBSD: ipsec.c,v 1.109 2005/04/04 18:40:45 hshoexer Exp $ */
/* $EOM: ipsec.c,v 1.143 2000/12/11 23:57:42 niklas Exp $ */
/*
@@ -1812,12 +1812,12 @@ ipsec_get_proto_port(char *section, u_int8_t *tproto, u_int16_t *port)
pstr = conf_get_str(section, "Port");
if (!pstr)
return 0;
- *port = htons((u_int16_t)atoi(pstr));
+ *port = (u_int16_t)atoi(pstr);
if (!*port) {
se = getservbyname(pstr,
pe ? pe->p_name : (pstr ? pstr : NULL));
if (se)
- *port = se->s_port;
+ *port = ntohs(se->s_port);
}
if (!*port) {
log_print("ipsec_get_proto_port: port \"%s\" unknown",