Commit 7874896a26624214bd7c05eeba7c8ab01548b1b5

Authored by Simon Horman
Committed by David S. Miller
1 parent d485d500cf

netfilter: nf_ct_sip: default to NF_ACCEPT in sip_help_tcp()

I initially noticed this because of the compiler warning below, but it
does seem to be a valid concern in the case where ct_sip_get_header()
returns 0 in the first iteration of the while loop.

net/netfilter/nf_conntrack_sip.c: In function 'sip_help_tcp':
net/netfilter/nf_conntrack_sip.c:1379: warning: 'ret' may be used uninitialized in this function

Signed-off-by: Simon Horman <horms@verge.net.au>
[Patrick: changed NF_DROP to NF_ACCEPT]
Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

net/netfilter/nf_conntrack_sip.c
... ... @@ -1376,7 +1376,7 @@
1376 1376 unsigned int msglen, origlen;
1377 1377 const char *dptr, *end;
1378 1378 s16 diff, tdiff = 0;
1379   - int ret;
  1379 + int ret = NF_ACCEPT;
1380 1380 typeof(nf_nat_sip_seq_adjust_hook) nf_nat_sip_seq_adjust;
1381 1381  
1382 1382 if (ctinfo != IP_CT_ESTABLISHED &&