Bug 49171 - ipv4/tcp_metrics.c:867: Calling 'sizeof' on 'sizeof' ?
Summary: ipv4/tcp_metrics.c:867: Calling 'sizeof' on 'sizeof' ?
Status: RESOLVED CODE_FIX
Alias: None
Product: Networking
Classification: Unclassified
Component: IPV4 (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Stephen Hemminger
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-21 10:31 UTC by David Binderman
Modified: 2012-11-08 14:20 UTC (History)
2 users (show)

See Also:
Kernel Version: 3.7-rc2
Subsystem:
Regression: No
Bisected commit-id:


Attachments

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

Note You need to log in before you can comment on or make changes to this bug.