Re: [PATCH v2 nf-next] netfilter: Decrease code duplication regarding transparent socket option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 01, 2018 at 02:54:07PM +0200, Máté Eckl wrote:
[...]
> There was a function in include/net/netfilter/nf_socket.h to decide if a
> socket has IP(V6)_TRANSPARENT socket option set or not. However this had
> done the same as inet_sk_transparent() in include/net/tcp.h
> 
> include/net/tcp.h:1733
> /* This helper checks if socket has IP_TRANSPARENT set */
> static inline bool inet_sk_transparent(const struct sock *sk)
> {
> 	switch (sk->sk_state) {
> 	case TCP_TIME_WAIT:
> 		return inet_twsk(sk)->tw_transparent;
> 	case TCP_NEW_SYN_RECV:
> 		return inet_rsk(inet_reqsk(sk))->no_srccheck;
> 	}
> 	return inet_sk(sk)->transparent;
> }
> 
> tproxy_sk_is_transparent has also been refactored to use this function instead of
> reimplementing it.

Applied, thanks.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux