diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-12-10 02:09:49 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2021-12-23 03:00:56 +0300 |
commit | 8801d791b48732acb3741cad06170fce880ed148 (patch) | |
tree | 7a1989e2a31a61a3180d0e5e292c2b6d8434814a /net/netfilter/nft_payload.c | |
parent | 0d1873a52289f7214e7e70d2d0552b617582269a (diff) | |
download | linux-8801d791b48732acb3741cad06170fce880ed148.tar.xz |
netfilter: nft_payload: WARN_ON_ONCE instead of BUG
BUG() is too harsh for unknown payload base, use WARN_ON_ONCE() instead.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_payload.c')
-rw-r--r-- | net/netfilter/nft_payload.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/netfilter/nft_payload.c b/net/netfilter/nft_payload.c index bd689938a2e0..f2e65df32a06 100644 --- a/net/netfilter/nft_payload.c +++ b/net/netfilter/nft_payload.c @@ -157,7 +157,8 @@ void nft_payload_eval(const struct nft_expr *expr, goto err; break; default: - BUG(); + WARN_ON_ONCE(1); + goto err; } offset += priv->offset; @@ -664,7 +665,8 @@ static void nft_payload_set_eval(const struct nft_expr *expr, goto err; break; default: - BUG(); + WARN_ON_ONCE(1); + goto err; } csum_offset = offset + priv->csum_offset; |