netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v3 0/4] em_ipt: add support for addrtype
@ 2019-06-27  8:10 Nikolay Aleksandrov
  2019-06-27  8:10 ` [PATCH net-next v3 1/4] net: sched: em_ipt: match only on ip/ipv6 traffic Nikolay Aleksandrov
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Nikolay Aleksandrov @ 2019-06-27  8:10 UTC (permalink / raw)
  To: netdev
  Cc: roopa, davem, pablo, xiyou.wangcong, jiri, jhs, eyal.birger,
	Nikolay Aleksandrov

Hi,
We would like to be able to use the addrtype from tc for ACL rules and
em_ipt seems the best place to add support for the already existing xt
match. The biggest issue is that addrtype revision 1 (with ipv6 support)
is NFPROTO_UNSPEC and currently em_ipt can't differentiate between v4/v6
if such xt match is used because it passes the match's family instead of
the packet one. The first 3 patches make em_ipt match only on IP
traffic (currently both policy and addrtype recognize such traffic
only) and make it pass the actual packet's protocol instead of the xt
match family when it's unspecified. They also add support for NFPROTO_UNSPEC
xt matches. The last patch allows to add addrtype rules via em_ipt.
We need to keep the user-specified nfproto for dumping in order to be
compatible with libxtables, we cannot dump NFPROTO_UNSPEC as the nfproto
or we'll get an error from libxtables, thus the nfproto is limited to
ipv4/ipv6 in patch 03 and is recorded.

v3: don't use the user nfproto for matching, only for dumping, more
    information is available in the commit message in patch 03
v2: change patch 02 to set the nfproto only when unspecified and drop
    patch 04 from v1 (Eyal Birger)

Thank you,
  Nikolay Aleksandrov


Nikolay Aleksandrov (4):
  net: sched: em_ipt: match only on ip/ipv6 traffic
  net: sched: em_ipt: set the family based on the packet if it's
    unspecified
  net: sched: em_ipt: keep the user-specified nfproto and dump it
  net: sched: em_ipt: add support for addrtype matching

 net/sched/em_ipt.c | 48 ++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 46 insertions(+), 2 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-06-29 18:17 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-27  8:10 [PATCH net-next v3 0/4] em_ipt: add support for addrtype Nikolay Aleksandrov
2019-06-27  8:10 ` [PATCH net-next v3 1/4] net: sched: em_ipt: match only on ip/ipv6 traffic Nikolay Aleksandrov
2019-06-27 16:02   ` Eyal Birger
2019-06-27 16:13     ` nikolay
2019-06-27  8:10 ` [PATCH net-next v3 2/4] net: sched: em_ipt: set the family based on the packet if it's unspecified Nikolay Aleksandrov
2019-06-27  8:10 ` [PATCH net-next v3 3/4] net: sched: em_ipt: keep the user-specified nfproto and dump it Nikolay Aleksandrov
2019-06-27  8:10 ` [PATCH net-next v3 4/4] net: sched: em_ipt: add support for addrtype matching Nikolay Aleksandrov
2019-06-27 10:01 ` [PATCH net-next v3 0/4] em_ipt: add support for addrtype Eyal Birger
2019-06-29 18:15 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).