mirror of
https://github.com/torvalds/linux.git
synced 2026-09-22 04:34:03 +02:00
netfilter: tproxy: use DEBUG_NET_WARN_ON_ONCE for protocol fallbacks
Replace WARN_ON calls with DEBUG_NET_WARN_ON_ONCE in the default switch blocks of nf_tproxy_get_sock_v4 and v6. Unsupported transport protocols are already safely handled by returning a NULL socket pointer. This prevents unnecessary system panics when panic_on_warn=1 is enabled in production systems. Link: https://patch.msgid.link/cover.1786968834.git.zhilinz@nebusec.ai/ Signed-off-by: Fernando Fernandez Mancera <fmancera@suse.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
This commit is contained in:
parent
746fc0787f
commit
1f0391aea8
|
|
@ -137,7 +137,7 @@ nf_tproxy_get_sock_v4(struct net *net, struct sk_buff *skb,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
DEBUG_NET_WARN_ON_ONCE(1);
|
||||
sk = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -136,7 +136,7 @@ nf_tproxy_get_sock_v6(struct net *net, struct sk_buff *skb, int thoff,
|
|||
}
|
||||
break;
|
||||
default:
|
||||
WARN_ON(1);
|
||||
DEBUG_NET_WARN_ON_ONCE(1);
|
||||
sk = NULL;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user