summaryrefslogtreecommitdiffstats
path: root/sys/net/pf_lb.c
diff options
context:
space:
mode:
authorjsg <jsg@openbsd.org>2015-07-20 18:42:08 +0000
committerjsg <jsg@openbsd.org>2015-07-20 18:42:08 +0000
commit443353dace62aea35da06674313ee5bd04fe0fe3 (patch)
treec1fc183ea001817fc7c0ba2924b2db57918ea757 /sys/net/pf_lb.c
parentAvoid possible NULL deref in openssl(1) s_server. (diff)
downloadwireguard-openbsd-443353dace62aea35da06674313ee5bd04fe0fe3.tar.xz
wireguard-openbsd-443353dace62aea35da06674313ee5bd04fe0fe3.zip
Add some panics to default paths where code later assumes a non default
path was taken. This both prevents warnings from clang and acts as a sanity check. ok mcbride@ henning@
Diffstat (limited to 'sys/net/pf_lb.c')
-rw-r--r--sys/net/pf_lb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/pf_lb.c b/sys/net/pf_lb.c
index 473d0dd974e..4e8d0cd4999 100644
--- a/sys/net/pf_lb.c
+++ b/sys/net/pf_lb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: pf_lb.c,v 1.47 2015/07/18 19:19:00 sashan Exp $ */
+/* $OpenBSD: pf_lb.c,v 1.48 2015/07/20 18:42:08 jsg Exp $ */
/*
* Copyright (c) 2001 Daniel Hartmeier
@@ -872,6 +872,8 @@ pf_postprocess_addr(struct pf_state *cur)
rpool = nr->nat;
else if (nr->route.addr.type != PF_ADDR_NONE)
rpool = nr->route;
+ else
+ panic("no appropriate pool");
if (((rpool.opts & PF_POOL_TYPEMASK) != PF_POOL_LEASTSTATES))
return (0);