diff options
author | 2015-10-13 19:32:31 +0000 | |
---|---|---|
committer | 2015-10-13 19:32:31 +0000 | |
commit | 614a62ad7ddb5b7e95bfb87244c323bef6740a59 (patch) | |
tree | dc0497c6d5e4eb57bc4f98a26f943ed9760dafe0 /sys/net/pf_ioctl.c | |
parent | sm_error() already does the exit for us. (diff) | |
download | wireguard-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_ioctl.c')
-rw-r--r-- | sys/net/pf_ioctl.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/net/pf_ioctl.c b/sys/net/pf_ioctl.c index 6939a4357e3..0709b8fb9ed 100644 --- a/sys/net/pf_ioctl.c +++ b/sys/net/pf_ioctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pf_ioctl.c,v 1.290 2015/09/04 21:40:25 kettenis Exp $ */ +/* $OpenBSD: pf_ioctl.c,v 1.291 2015/10/13 19:32:31 sashan Exp $ */ /* * Copyright (c) 2001 Daniel Hartmeier @@ -2175,8 +2175,7 @@ pfioctl(dev_t dev, u_long cmd, caddr_t addr, int flags, struct proc *p) bzero(&pstore->entry, sizeof(pstore->entry)); pstore->rule.ptr = NULL; pstore->kif = NULL; - if (n->rule.ptr != NULL) - pstore->rule.nr = n->rule.ptr->nr; + pstore->rule.nr = n->rule.ptr->nr; pstore->creation = secs - pstore->creation; if (pstore->expire > secs) pstore->expire -= secs; |