diff options
author | 2015-07-20 18:42:08 +0000 | |
---|---|---|
committer | 2015-07-20 18:42:08 +0000 | |
commit | 443353dace62aea35da06674313ee5bd04fe0fe3 (patch) | |
tree | c1fc183ea001817fc7c0ba2924b2db57918ea757 /sys/net/pf_lb.c | |
parent | Avoid possible NULL deref in openssl(1) s_server. (diff) | |
download | wireguard-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.c | 4 |
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); |