summaryrefslogtreecommitdiffstats
path: root/sys/net/pf_lb.c
diff options
context:
space:
mode:
authorsashan <sashan@openbsd.org>2015-10-13 19:32:31 +0000
committersashan <sashan@openbsd.org>2015-10-13 19:32:31 +0000
commit614a62ad7ddb5b7e95bfb87244c323bef6740a59 (patch)
treedc0497c6d5e4eb57bc4f98a26f943ed9760dafe0 /sys/net/pf_lb.c
parentsm_error() already does the exit for us. (diff)
downloadwireguard-openbsd-614a62ad7ddb5b7e95bfb87244c323bef6740a59.tar.xz
wireguard-openbsd-614a62ad7ddb5b7e95bfb87244c323bef6740a59.zip
- pf_insert_src_node(): global argument (arg6) is useless, function
always gets pointer to rule. - pf_remove_src_node(): function should always remove matching src node, regardless the sn->rule.ptr being NULL or valid rule - sn->rule.ptr is never NULL, spotted by mpi and Richard Procter _von_ gmail.com OK mpi@, OK mikeb@
Diffstat (limited to 'sys/net/pf_lb.c')
-rw-r--r--sys/net/pf_lb.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c
index 6a8ea988d1d..72d5c27950e 100644
--- a/sys/net/pf_lb.c
+++ b/sys/net/pf_lb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_lb.c,v 1.49 2015/08/03 13:33:12 jsg Exp $ */
+/* $OpenBSD: pf_lb.c,v 1.50 2015/10/13 19:32:31 sashan Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -621,8 +621,7 @@ pf_map_addr(sa_family_t af, struct pf_rule *r, struct pf_addr *saddr,
pf_remove_src_node(sns[type]);
sns[type] = NULL;
}
- if (pf_insert_src_node(&sns[type], r, type, af, saddr, naddr,
- 0))
+ if (pf_insert_src_node(&sns[type], r, type, af, saddr, naddr))
return (1);
}