<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/net/netfilter/nft_socket.c, branch v4.18</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>netfilter: nft_socket: fix module autoload</title>
<updated>2018-06-12T17:12:45+00:00</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2018-06-07T15:56:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=3fb61eca185cc65a1be23d9a5a11347eef79f597'/>
<id>3fb61eca185cc65a1be23d9a5a11347eef79f597</id>
<content type='text'>
Add alias definition for module autoload when adding socket rules.

Fixes: 554ced0a6e29 ("netfilter: nf_tables: add support for native socket matching")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add alias definition for module autoload when adding socket rules.

Fixes: 554ced0a6e29 ("netfilter: nf_tables: add support for native socket matching")
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: Decrease code duplication regarding transparent socket option</title>
<updated>2018-06-02T22:02:01+00:00</updated>
<author>
<name>Máté Eckl</name>
<email>ecklm94@gmail.com</email>
</author>
<published>2018-06-01T12:54:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=8d6e555773690e6fdefd99723fcd0a7e432c0c90'/>
<id>8d6e555773690e6fdefd99723fcd0a7e432c0c90</id>
<content type='text'>
There is 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
does 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-&gt;sk_state) {
	case TCP_TIME_WAIT:
		return inet_twsk(sk)-&gt;tw_transparent;
	case TCP_NEW_SYN_RECV:
		return inet_rsk(inet_reqsk(sk))-&gt;no_srccheck;
	}
	return inet_sk(sk)-&gt;transparent;
}

tproxy_sk_is_transparent has also been refactored to use this function
instead of reimplementing it.

Signed-off-by: Máté Eckl &lt;ecklm94@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There is 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
does 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-&gt;sk_state) {
	case TCP_TIME_WAIT:
		return inet_twsk(sk)-&gt;tw_transparent;
	case TCP_NEW_SYN_RECV:
		return inet_rsk(inet_reqsk(sk))-&gt;no_srccheck;
	}
	return inet_sk(sk)-&gt;transparent;
}

tproxy_sk_is_transparent has also been refactored to use this function
instead of reimplementing it.

Signed-off-by: Máté Eckl &lt;ecklm94@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>netfilter: nf_tables: add support for native socket matching</title>
<updated>2018-06-01T07:46:15+00:00</updated>
<author>
<name>Máté Eckl</name>
<email>ecklm94@gmail.com</email>
</author>
<published>2018-05-28T07:15:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=554ced0a6e2946562c20d9fffdbaf2aa7da36b1b'/>
<id>554ced0a6e2946562c20d9fffdbaf2aa7da36b1b</id>
<content type='text'>
Now it can only match the transparent flag of an ip/ipv6 socket.

Signed-off-by: Máté Eckl &lt;ecklm94@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now it can only match the transparent flag of an ip/ipv6 socket.

Signed-off-by: Máté Eckl &lt;ecklm94@gmail.com&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
