From e07e8174628d201657395f39d8c15db439e8700d Mon Sep 17 00:00:00 2001 From: Luigi Rizzo Date: Mon, 17 Jul 2000 20:03:27 +0000 Subject: close PR 19544 - ipfw pipe delete causes panic when no pipes defined PR: 19544 --- sys/netinet/ip_dummynet.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sys/netinet') diff --git a/sys/netinet/ip_dummynet.c b/sys/netinet/ip_dummynet.c index 39492b985a6c..7b1163b53fa1 100644 --- a/sys/netinet/ip_dummynet.c +++ b/sys/netinet/ip_dummynet.c @@ -1549,7 +1549,7 @@ delete_pipe(struct dn_pipe *p) /* locate pipe */ for (a = NULL , b = all_pipes ; b && b->pipe_nr < p->pipe_nr ; a = b , b = b->next) ; - if (b && b->pipe_nr != p->pipe_nr) + if (b == NULL || b->pipe_nr != p->pipe_nr) return EINVAL ; /* not found */ s = splnet() ; @@ -1585,7 +1585,7 @@ delete_pipe(struct dn_pipe *p) /* locate set */ for (a = NULL, b = all_flow_sets ; b && b->fs_nr < p->fs.fs_nr ; a = b , b = b->next) ; - if (b && b->fs_nr != p->fs.fs_nr) + if (b == NULL || b->fs_nr != p->fs.fs_nr) return EINVAL ; /* not found */ s = splnet() ; -- cgit v1.3