version 1.1.1.1, 2012/02/21 22:39:10
|
version 1.1.1.2, 2014/06/15 16:37:12
|
Line 1
|
Line 1
|
/* $NetBSD: handler.c,v 1.39 2011/03/14 17:18:12 tteras Exp $ */ | /* $NetBSD: handler.c,v 1.39.2.1 2011/11/17 14:46:31 vanhu Exp $ */ |
|
|
/* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */ |
/* Id: handler.c,v 1.28 2006/05/26 12:17:29 manubsd Exp */ |
|
|
Line 611 getph2byid(src, dst, spid)
|
Line 611 getph2byid(src, dst, spid)
|
struct sockaddr *src, *dst; |
struct sockaddr *src, *dst; |
u_int32_t spid; |
u_int32_t spid; |
{ |
{ |
struct ph2handle *p; | struct ph2handle *p, *next; |
|
|
LIST_FOREACH(p, &ph2tree, chain) { | for (p = LIST_FIRST(&ph2tree); p; p = next) { |
| next = LIST_NEXT(p, chain); |
| |
if (spid == p->spid && |
if (spid == p->spid && |
cmpsaddr(src, p->src) <= CMPSADDR_WILDPORT_MATCH && |
cmpsaddr(src, p->src) <= CMPSADDR_WILDPORT_MATCH && |
cmpsaddr(dst, p->dst) <= CMPSADDR_WILDPORT_MATCH){ |
cmpsaddr(dst, p->dst) <= CMPSADDR_WILDPORT_MATCH){ |
Line 985 void
|
Line 987 void
|
remcontacted(remote) |
remcontacted(remote) |
struct sockaddr *remote; |
struct sockaddr *remote; |
{ |
{ |
struct contacted *p; | struct contacted *p, *next; |
|
|
LIST_FOREACH(p, &ctdtree, chain) { | for (p = LIST_FIRST(&ctdtree); p; p = next) { |
| next = LIST_NEXT(p, chain); |
| |
if (cmpsaddr(remote, p->remote) <= CMPSADDR_WILDPORT_MATCH) { |
if (cmpsaddr(remote, p->remote) <= CMPSADDR_WILDPORT_MATCH) { |
LIST_REMOVE(p, chain); |
LIST_REMOVE(p, chain); |
racoon_free(p->remote); |
racoon_free(p->remote); |
Line 1555 int
|
Line 1559 int
|
purgeph1bylogin(login) |
purgeph1bylogin(login) |
char *login; |
char *login; |
{ |
{ |
struct ph1handle *p; | struct ph1handle *p, *next; |
int found = 0; |
int found = 0; |
|
|
LIST_FOREACH(p, &ph1tree, chain) { | for (p = LIST_FIRST(&ph1tree); p; p = next) { |
| next = LIST_NEXT(p, chain); |
| |
if (p->mode_cfg == NULL) |
if (p->mode_cfg == NULL) |
continue; |
continue; |
if (strncmp(p->mode_cfg->login, login, LOGINLEN) == 0) { |
if (strncmp(p->mode_cfg->login, login, LOGINLEN) == 0) { |