[Devel] Re: [patch 1/2] net namespace : Add broadcasting
Daniel Lezcano
daniel.lezcano at free.fr
Fri Dec 15 12:21:03 PST 2006
Dave Hansen wrote:
> On Fri, 2006-12-15 at 18:20 +0100, dlezcano at fr.ibm.com wrote:
>
>> --- 2.6.19-mm1.orig/net/ipv4/udp.c
>> +++ 2.6.19-mm1/net/ipv4/udp.c
>> @@ -306,9 +306,12 @@ static inline struct sock *udp_v4_mcast_
>> (inet->dport != rmt_port && inet->dport) ||
>> (inet->rcv_saddr && inet->rcv_saddr != loc_addr) ||
>> ipv6_only_sock(s) ||
>> - !net_ns_match(sk->sk_net_ns, ns) ||
>> (s->sk_bound_dev_if && s->sk_bound_dev_if != dif))
>> continue;
>> +#ifdef CONFIG_NET_NS
>> + if (!net_ns_sock_is_visible(sk, ns))
>> + continue;
>> +#endif
>>
>
> Why is this #ifdef needed? Isn't the stub in the header good enough?
>
I don't know. What does the compiler ? Will it remove the "return 1"
code from the stub if CONFIG_NET_NS is disabled because the test will be
always true ?
_______________________________________________
Containers mailing list
Containers at lists.osdl.org
https://lists.osdl.org/mailman/listinfo/containers
More information about the Devel
mailing list