<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux/net/netfilter/xt_physdev.c, branch v4.5</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
</subtitle>
<id>https://git.shady.money/linux/atom?h=v4.5</id>
<link rel='self' href='https://git.shady.money/linux/atom?h=v4.5'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/'/>
<updated>2015-04-08T14:49:09Z</updated>
<entry>
<title>netfilter: physdev: use helpers</title>
<updated>2015-04-08T14:49:09Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2015-04-02T12:31:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=a99074ae1f5cce08c769542440391981899ac04c'/>
<id>urn:sha1:a99074ae1f5cce08c769542440391981899ac04c</id>
<content type='text'>
Avoid skb-&gt;nf_bridge accesses where possible.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: bridge: remove BRNF_STATE_BRIDGED flag</title>
<updated>2015-03-16T13:35:02Z</updated>
<author>
<name>Florian Westphal</name>
<email>fw@strlen.de</email>
</author>
<published>2015-03-10T09:36:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=e4bb9bcbfb7d67431dfd49860f62770a7f40193b'/>
<id>urn:sha1:e4bb9bcbfb7d67431dfd49860f62770a7f40193b</id>
<content type='text'>
Its not needed anymore since 2bf540b73ed5b
([NETFILTER]: bridge-netfilter: remove deferred hooks).
Before this it was possible to have physoutdev set for locally generated
packets -- this isn't the case anymore:

BRNF_STATE_BRIDGED flag is set when we assign nf_bridge-&gt;physoutdev,
so physoutdev != NULL means BRNF_STATE_BRIDGED is set.
If physoutdev is NULL, then we are looking at locally-delivered and
routed packet.

Signed-off-by: Florian Westphal &lt;fw@strlen.de&gt;
Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: explicit module dependency between br_netfilter and physdev</title>
<updated>2014-10-02T16:30:57Z</updated>
<author>
<name>Pablo Neira Ayuso</name>
<email>pablo@netfilter.org</email>
</author>
<published>2014-10-02T09:13:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4b7fd5d97ee6e599247b4a55122ca6ba80c8148d'/>
<id>urn:sha1:4b7fd5d97ee6e599247b4a55122ca6ba80c8148d</id>
<content type='text'>
You can use physdev to match the physical interface enslaved to the
bridge device. This information is stored in skb-&gt;nf_bridge and it is
set up by br_netfilter. So, this is only available when iptables is
used from the bridge netfilter path.

Since 34666d4 ("netfilter: bridge: move br_netfilter out of the core"),
the br_netfilter code is modular. To reduce the impact of this change,
we can autoload the br_netfilter if the physdev match is used since
we assume that the users need br_netfilter in place.

Signed-off-by: Pablo Neira Ayuso &lt;pablo@netfilter.org&gt;
</content>
</entry>
<entry>
<title>netfilter: xtables: deconstify struct xt_action_param for matches</title>
<updated>2010-05-11T16:33:37Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-07-07T18:42:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=62fc8051083a334578c3f4b3488808f210b4565f'/>
<id>urn:sha1:62fc8051083a334578c3f4b3488808f210b4565f</id>
<content type='text'>
In future, layer-3 matches will be an xt module of their own, and
need to set the fragoff and thoff fields. Adding more pointers would
needlessy increase memory requirements (esp. so for 64-bit, where
pointers are wider).

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
</entry>
<entry>
<title>netfilter: xtables: substitute temporary defines by final name</title>
<updated>2010-05-11T16:31:17Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2009-07-05T17:43:26Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=4b560b447df83368df44bd3712c0c39b1d79ba04'/>
<id>urn:sha1:4b560b447df83368df44bd3712c0c39b1d79ba04</id>
<content type='text'>
Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
</entry>
<entry>
<title>netfilter: xtables: change matches to return error code</title>
<updated>2010-03-25T15:55:24Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2010-03-23T15:35:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=bd414ee605ff3ac5fcd79f57269a897879ee4cde'/>
<id>urn:sha1:bd414ee605ff3ac5fcd79f57269a897879ee4cde</id>
<content type='text'>
The following semantic patch does part of the transformation:
// &lt;smpl&gt;
@ rule1 @
struct xt_match ops;
identifier check;
@@
 ops.checkentry = check;

@@
identifier rule1.check;
@@
 check(...) { &lt;...
-return true;
+return 0;
 ...&gt; }

@@
identifier rule1.check;
@@
 check(...) { &lt;...
-return false;
+return -EINVAL;
 ...&gt; }
// &lt;/smpl&gt;

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
</entry>
<entry>
<title>netfilter: xtables: change xt_match.checkentry return type</title>
<updated>2010-03-25T15:03:13Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2010-03-19T16:16:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b0f38452ff73da7e9e0ddc68cd5c6b93c897ca0d'/>
<id>urn:sha1:b0f38452ff73da7e9e0ddc68cd5c6b93c897ca0d</id>
<content type='text'>
Restore function signatures from bool to int so that we can report
memory allocation failures or similar using -ENOMEM rather than
always having to pass -EINVAL back.

This semantic patch may not be too precise (checking for functions
that use xt_mtchk_param rather than functions referenced by
xt_match.checkentry), but reviewed, it produced the intended result.

// &lt;smpl&gt;
@@
type bool;
identifier check, par;
@@
-bool check
+int check
 (struct xt_mtchk_param *par) { ... }
// &lt;/smpl&gt;

Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
</entry>
<entry>
<title>netfilter: xt extensions: use pr_&lt;level&gt;</title>
<updated>2010-03-18T13:20:07Z</updated>
<author>
<name>Jan Engelhardt</name>
<email>jengelh@medozas.de</email>
</author>
<published>2010-03-17T15:04:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=8bee4bad03c5b601bd6cea123c31025680587ccc'/>
<id>urn:sha1:8bee4bad03c5b601bd6cea123c31025680587ccc</id>
<content type='text'>
Signed-off-by: Jan Engelhardt &lt;jengelh@medozas.de&gt;
</content>
</entry>
<entry>
<title>netfilter: factorize ifname_compare()</title>
<updated>2009-03-25T16:31:52Z</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2009-03-25T16:31:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=b8dfe498775de912116f275680ddb57c8799d9ef'/>
<id>urn:sha1:b8dfe498775de912116f275680ddb57c8799d9ef</id>
<content type='text'>
We use same not trivial helper function in four places. We can factorize it.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
<entry>
<title>netfilter: xt_physdev: unfold two loops in physdev_mt()</title>
<updated>2009-02-19T10:17:17Z</updated>
<author>
<name>Eric Dumazet</name>
<email>dada1@cosmosbay.com</email>
</author>
<published>2009-02-19T10:17:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/linux/commit/?id=eacc17fb64f03b6c268aaf6cea320100d19d8af5'/>
<id>urn:sha1:eacc17fb64f03b6c268aaf6cea320100d19d8af5</id>
<content type='text'>
xt_physdev netfilter module can use an ifname_compare() helper
so that two loops are unfolded.

Signed-off-by: Eric Dumazet &lt;dada1@cosmosbay.com&gt;
Signed-off-by: Patrick McHardy &lt;kaber@trash.net&gt;
</content>
</entry>
</feed>
