summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>1997-02-21 08:26:09 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>1997-02-21 08:26:09 +0000
commitce6c230a089eae97b432b90cd9dc3a960a5bc0c7 (patch)
treefd556ef81b396bda205f5b6aba98c48b8a43dfcf /sys
parent0f4abeda024e0f5340ea574f3dc09e08fcc73587 (diff)
Fixed error introduced with last patch.
Diffstat (limited to 'sys')
-rw-r--r--sys/netinet/ip_ipsp.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/netinet/ip_ipsp.c b/sys/netinet/ip_ipsp.c
index 58312df7017..3f5e6b88648 100644
--- a/sys/netinet/ip_ipsp.c
+++ b/sys/netinet/ip_ipsp.c
@@ -96,7 +96,6 @@ struct xformsw *xformswNXFORMSW = &xformsw[sizeof(xformsw)/sizeof(xformsw[0])];
unsigned char ipseczeroes[IPSEC_ZEROES_SIZE]; /* zeroes! */
static char *ipspkernfs = NULL;
-static int ipspkernfs_len = 0;
int ipspkernfs_dirty = 1;
/*
@@ -203,7 +202,7 @@ ipsp_kern(int off, char **bufp, int len)
if ((!ipspkernfs_dirty) && (ipspkernfs))
{
*bufp = ipspkernfs;
- return ipspkernfs_len;
+ return strlen(ipspkernfs);
}
else
ipspkernfs_dirty = 0;
@@ -233,8 +232,6 @@ ipsp_kern(int off, char **bufp, int len)
if (!ipspkernfs)
return 0;
- ipspkernfs_len = k + 1;
-
for (i = 0, k = 0; i < TDB_HASHMOD; i++)
for (tdbp = tdbh[i]; tdbp != (struct tdb *) NULL; tdbp = tdbp->tdb_hnext)
{
@@ -251,5 +248,5 @@ ipsp_kern(int off, char **bufp, int len)
ipspkernfs[k] = '\0';
*bufp = ipspkernfs;
- return ipspkernfs_len;
+ return strlen(ipspkernfs);
}