summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorLinkui Xiao <xiaolinkui@kylinos.cn>2023-11-01 04:20:18 +0100
committerPablo Neira Ayuso <pablo@netfilter.org>2023-11-14 16:16:21 +0100
commita44af08e3d4d7566eeea98d7a29fe06e7b9de944 (patch)
tree3c39a43c760bb3e4f3f4d9b4a1e7a604b0dda2b9 /net
parentnetfilter: nft_set_rbtree: Remove unused variable nft_net (diff)
downloadlinux-a44af08e3d4d7566eeea98d7a29fe06e7b9de944.tar.xz
linux-a44af08e3d4d7566eeea98d7a29fe06e7b9de944.zip
netfilter: nf_conntrack_bridge: initialize err to 0
K2CI reported a problem: consume_skb(skb); return err; [nf_br_ip_fragment() error] uninitialized symbol 'err'. err is not initialized, because returning 0 is expected, initialize err to 0. Fixes: 3c171f496ef5 ("netfilter: bridge: add connection tracking system") Reported-by: k2ci <kernel-bot@kylinos.cn> Signed-off-by: Linkui Xiao <xiaolinkui@kylinos.cn> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net')
-rw-r--r--net/bridge/netfilter/nf_conntrack_bridge.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/bridge/netfilter/nf_conntrack_bridge.c b/net/bridge/netfilter/nf_conntrack_bridge.c
index b5c406a6e765..abb090f94ed2 100644
--- a/net/bridge/netfilter/nf_conntrack_bridge.c
+++ b/net/bridge/netfilter/nf_conntrack_bridge.c
@@ -37,7 +37,7 @@ static int nf_br_ip_fragment(struct net *net, struct sock *sk,
ktime_t tstamp = skb->tstamp;
struct ip_frag_state state;
struct iphdr *iph;
- int err;
+ int err = 0;
/* for offloaded checksums cleanup checksum before fragmentation */
if (skb->ip_summed == CHECKSUM_PARTIAL &&