diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2000-01-09 22:53:41 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2000-01-09 22:53:41 +0000 |
commit | 89930c2787c3be1944397c36f5f4e1cfc07b90d1 (patch) | |
tree | 17e025fb35e590cc53df8eb98e31f4ae087ada85 /sbin/ipsecadm | |
parent | 3ec655c8f23e717f6ad2f5c6986bcfbd33df32dd (diff) |
Transport protocol ports are in network order.
Diffstat (limited to 'sbin/ipsecadm')
-rw-r--r-- | sbin/ipsecadm/ipsecadm.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |