diff options
author | guido <guido@FreeBSD.org> | 2005-12-30 11:22:11 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 2005-12-30 11:22:11 +0000 |
commit | 74f74123f3fdf4235d201dc8b4227d9d11d7dce5 (patch) | |
tree | 658db597994c3e9227c2101b920c16b0f10bfdfc /sys/contrib/ipfilter/netinet/ip_htable.c | |
parent | 28f64fe3cea04b47311e7db06814b6b9be539040 (diff) | |
download | FreeBSD-src-74f74123f3fdf4235d201dc8b4227d9d11d7dce5.zip FreeBSD-src-74f74123f3fdf4235d201dc8b4227d9d11d7dce5.tar.gz |
Import IP Filter version 4.1.10
Diffstat (limited to 'sys/contrib/ipfilter/netinet/ip_htable.c')
-rw-r--r-- | sys/contrib/ipfilter/netinet/ip_htable.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/sys/contrib/ipfilter/netinet/ip_htable.c b/sys/contrib/ipfilter/netinet/ip_htable.c index 22acbec..92ed8d5 100644 --- a/sys/contrib/ipfilter/netinet/ip_htable.c +++ b/sys/contrib/ipfilter/netinet/ip_htable.c @@ -1,5 +1,3 @@ -/* $FreeBSD$ */ - /* * Copyright (C) 1993-2001, 2003 by Darren Reed. * @@ -53,7 +51,7 @@ struct file; /* END OF INCLUDES */ #if !defined(lint) -static const char rcsid[] = "@(#)Id: ip_htable.c,v 2.34.2.2 2004/10/17 15:49:15 darrenr Exp"; +static const char rcsid[] = "@(#)$Id: ip_htable.c,v 2.34.2.4 2005/11/13 15:38:37 darrenr Exp $"; #endif #ifdef IPFILTER_LOOKUP @@ -104,8 +102,10 @@ iplookupop_t *op; int err, i, unit; KMALLOC(iph, iphtable_t *); - if (iph == NULL) + if (iph == NULL) { + ipht_nomem[op->iplo_unit]++; return ENOMEM; + } err = COPYIN(op->iplo_struct, iph, sizeof(*iph)); if (err != 0) { @@ -139,12 +139,9 @@ iplookupop_t *op; sizeof(oiph->iph_name)) == 0) break; } while (oiph != NULL); + (void)strncpy(iph->iph_name, name, sizeof(iph->iph_name)); - err = COPYOUT(iph, op->iplo_struct, sizeof(*iph)); - if (err != 0) { - KFREE(iph); - return EFAULT; - } + (void)strncpy(op->iplo_name, name, sizeof(op->iplo_name)); iph->iph_type |= IPHASH_ANON; } |