From 89930c2787c3be1944397c36f5f4e1cfc07b90d1 Mon Sep 17 00:00:00 2001 From: "Angelos D. Keromytis" Date: Sun, 9 Jan 2000 22:53:41 +0000 Subject: Transport protocol ports are in network order. --- sbin/ipsecadm/ipsecadm.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'sbin/ipsecadm/ipsecadm.c') diff --git a/sbin/ipsecadm/ipsecadm.c b/sbin/ipsecadm/ipsecadm.c index 5054db06cf1..f42e874d911 100644 --- a/sbin/ipsecadm/ipsecadm.c +++ b/sbin/ipsecadm/ipsecadm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ipsecadm.c,v 1.28 1999/12/20 05:38:22 angelos Exp $ */ +/* $OpenBSD: ipsecadm.c,v 1.29 2000/01/09 22:53:40 angelos Exp $ */ /* * The authors of this code are John Ioannidis (ji@tla.org), * Angelos D. Keromytis (kermit@csd.uch.gr) and @@ -875,10 +875,10 @@ main(int argc, char **argv) exit(1); } - sport = svp->s_port; + sport = htons(svp->s_port); } else - sport = atoi(argv[i+1]); + sport = htons(atoi(argv[i+1])); osrc->sin.sin_port = sport; osmask->sin.sin_port = 0xffff; @@ -899,10 +899,10 @@ main(int argc, char **argv) argv[0], argv[i + 1], transportproto); exit(1); } - dport = svp->s_port; + dport = htons(svp->s_port); } else - dport = atoi(argv[i + 1]); + dport = htons(atoi(argv[i + 1])); odst->sin.sin_port = dport; odmask->sin.sin_port = 0xffff; -- cgit v1.2.3