Bug 49171

Summary: ipv4/tcp_metrics.c:867: Calling 'sizeof' on 'sizeof' ?
Product: Networking Reporter: David Binderman (dcb314)
Component: IPV4Assignee: Stephen Hemminger (stephen)
Status: RESOLVED CODE_FIX    
Severity: normal CC: alan, florian
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.7-rc2 Subsystem:
Regression: No Bisected commit-id:

Description David Binderman 2012-10-21 10:31:05 UTC
The source code is

        if (nla_len(a) != sizeof(sizeof(struct in6_addr)))

I'm surprised that compiles. Suggest remove one of the sizeofs.
Comment 1 Florian Mickler 2012-11-05 23:13:37 UTC
A patch referencing this bug report has been merged in Linux v3.7-rc4:

commit 2c42a3fb30845867bfcaf0747ff50c1375884ff2
Author: Julian Anastasov <ja@ssi.bg>
Date:   Tue Oct 30 12:03:09 2012 +0000

    tcp: Fix double sizeof in new tcp_metrics code