lkml.org 
[lkml]   [2006]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 2.6.17] net/ipv6/udp.c: remove duplicate udp_get_port code
From
Hello.

In article <200608160846.48174@strip-the-willow> (at Wed, 16 Aug 2006 08:46:48 +0100), gerrit@erg.abdn.ac.uk says:

> UDPv4 and UDPv6 use an almost identical version of the get_port function,
> which is unnecessary since the (long) code differs in only one if-statement.
:

:
> +#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
> + else if(sk->sk_family == PF_INET6 &&
> + ipv6_rcv_saddr_equal(sk, sk2) )
> + goto fail;
> + }
> +#endif

This is not good because you cannot link ipv6_rcv_saddr_equal()
if you are compiling IPv6 as module.

How about retaining udp_v{4,6}_get_port() and call
common udp_get_port() from both functions?

--yoshfuji
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-08-16 10:53    [W:0.031 / U:1.132 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site