summaryrefslogtreecommitdiff
path: root/sys/net
diff options
context:
space:
mode:
authorRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-03-11 10:15:27 +0000
committerRyan Thomas McBride <mcbride@cvs.openbsd.org>2004-03-11 10:15:27 +0000
commite6b226fd199972f0c46e2eeb8b26b7693fbd5203 (patch)
tree1551c474a67e3fbcda519869cd32efbc44be42ef /sys/net
parent4cb0f80e4a8c859462610e067b6ca5eee3da051b (diff)
Don't call pf_src_tree_remove_state() on error in pf_insert_state(),
it's also called in the function which calls pf_insert_state(). Pointed out by Patrick Latifi, ok cedric@ dhartmei@
Diffstat (limited to 'sys/net')
-rw-r--r--sys/net/pf.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pf.c b/sys/net/pf.c
index 5a0fff6237f..699e29dfbb7 100644
--- a/sys/net/pf.c
+++ b/sys/net/pf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf.c,v 1.429 2004/03/09 21:44:40 mcbride Exp $ */
+/* $OpenBSD: pf.c,v 1.430 2004/03/11 10:15:26 mcbride Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -629,7 +629,6 @@ pf_insert_state(struct pfi_kif *kif, struct pf_state *state)
printf(" (from sync)");
printf("\n");
}
- pf_src_tree_remove_state(state);
return (-1);
}
@@ -650,7 +649,6 @@ pf_insert_state(struct pfi_kif *kif, struct pf_state *state)
printf("\n");
}
RB_REMOVE(pf_state_tree_lan_ext, &kif->pfik_lan_ext, state);
- pf_src_tree_remove_state(state);
return (-1);
}
@@ -778,6 +776,7 @@ pf_src_tree_remove_state(struct pf_state *s)
s->nat_src_node->expire = time.tv_sec + timeout;
}
}
+ s->src_node = s->nat_src_node = NULL;
}
void