Subject: Re: [PATCH net-next 3/3] net: tcp_probe: add IPv6 support

From: Daniel Borkmann <[email-masked]>
Date: Thu, 22 Aug 2013 23:20:23 +0200

On 08/22/2013 10:43 PM, David Miller wrote:
> From: Daniel Borkmann <[email-masked]>
> Date: Wed, 21 Aug 2013 19:48:00 +0200
>
>> +	union {
>> +		struct sockaddr		raw;
>> +		struct sockaddr_in	v4;
>> +		struct sockaddr_in6	v6;
>> +	}	src, dst;
>
> This bloats up the tcp_log structure unnecessarily.  You have
> absolutely no use for the port member, for example.
>
> I know you want to use this so that you can be lazy and only
> use the single printf format specifier.  Here, keeping the
> tcp_log compact is more important.

Well, the port is being filled out *and* used in both IPv4 and IPv6
cases. That is why %pISpc is being used, hence IP + port that is being
printed. The port was of course also printed to the log before in
IPv4 only case, so nothing would change there.