Subject: Re: [PATCH 11/13] udp_diag: Implement the get_exact dumping functionality

From: Pavel Emelyanov <[email-masked]>
Date: Sat, 10 Dec 2011 13:07:51 +0400

On 12/10/2011 01:48 AM, Eric Dumazet wrote:
> Le vendredi 09 décembre 2011 à 20:24 +0400, Pavel Emelyanov a écrit :
>> Do the same as TCP does -- lookup a socket in the given udp_table,
>> check cookie, fill the reply message with existing inet socket dumping
>> helper and send one back.
>>
>> Signed-off-by: Pavel Emelyanov <[email-masked]>
> 
>> +
>> +	if (req->sdiag_family == AF_INET)
>> +		sk = __udp4_lib_lookup(&init_net,
>> +				req->id.idiag_src[0], req->id.idiag_sport,
>> +				req->id.idiag_dst[0], req->id.idiag_dport,
>> +				req->id.idiag_if, tbl);
>> +	else if (req->sdiag_family == AF_INET6)
>> +		sk = __udp6_lib_lookup(&init_net,
>> +				(struct in6_addr *)req->id.idiag_src,
>> +				req->id.idiag_sport,
>> +				(struct in6_addr *)req->id.idiag_dst,
>> +				req->id.idiag_dport,
>> +				req->id.idiag_if, tbl);
>> +	else
> 
> OK, but what happens if IPv6 is a module ?

And the udp_diag is built-in, right?

>   LD      .tmp_vmlinux1
> net/built-in.o: In function `udp_dump_one':
> udp_diag.c:(.text+0xa2b40): undefined reference to `__udp6_lib_lookup'
> make: *** [.tmp_vmlinux1] Erreur 1

Crap :( I suppose the Kconfig rule should be fixed, I will try to provide a fix...

Thanks,
Pavel