summaryrefslogtreecommitdiff
path: root/sbin/ipsec/sah
diff options
context:
space:
mode:
Diffstat (limited to 'sbin/ipsec/sah')
-rw-r--r--sbin/ipsec/sah/sah.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/ipsec/sah/sah.c b/sbin/ipsec/sah/sah.c
index 75a4b25cdc0..d7ef6dbdc6d 100644
--- a/sbin/ipsec/sah/sah.c
+++ b/sbin/ipsec/sah/sah.c
@@ -62,7 +62,7 @@ int x2i(char *s)
ss[1] = s[1];
ss[2] = 0;
- return strtol(ss, NULL, 16);
+ return strtoul(ss, NULL, 16);
}
@@ -91,7 +91,7 @@ char **argv;
em->em_msglen = EMT_SETSPI_FLEN + 4 + klen;
em->em_version = 0;
em->em_type = EMT_SETSPI;
- em->em_spi = htonl(strtol(argv[2], NULL, 16));
+ em->em_spi = htonl(strtoul(argv[2], NULL, 16));
em->em_if = 1;
em->em_dst.s_addr = inet_addr(argv[1]);
em->em_alg = XF_AHMD5;