From: David Miller <davem@davemloft.net>
To: mcroce@redhat.com
Cc: netdev@vger.kernel.org, dev@openvswitch.org,
linux-kernel@vger.kernel.org, pshelar@ovn.org,
bindiyakurle@gmail.com, simon.horman@netronome.com, blp@ovn.org,
nikolay@cumulusnetworks.com, nicolas.dichtel@6wind.com,
jgh@redhat.com
Subject: Re: [PATCH net-next v5] openvswitch: add TTL decrement action
Date: Sun, 16 Feb 2020 19:34:57 -0800 (PST) [thread overview]
Message-ID: <20200216.193457.413155281457804366.davem@davemloft.net> (raw)
In-Reply-To: <20200215132056.42124-1-mcroce@redhat.com>
From: Matteo Croce <mcroce@redhat.com>
Date: Sat, 15 Feb 2020 14:20:56 +0100
> New action to decrement TTL instead of setting it to a fixed value.
> This action will decrement the TTL and, in case of expired TTL, drop it
> or execute an action passed via a nested attribute.
> The default TTL expired action is to drop the packet.
>
> Supports both IPv4 and IPv6 via the ttl and hop_limit fields, respectively.
>
> Tested with a corresponding change in the userspace:
>
> # ovs-dpctl dump-flows
> in_port(2),eth(),eth_type(0x0800), packets:0, bytes:0, used:never, actions:dec_ttl{ttl<=1 action:(drop)},1
> in_port(1),eth(),eth_type(0x0800), packets:0, bytes:0, used:never, actions:dec_ttl{ttl<=1 action:(drop)},2
> in_port(1),eth(),eth_type(0x0806), packets:0, bytes:0, used:never, actions:2
> in_port(2),eth(),eth_type(0x0806), packets:0, bytes:0, used:never, actions:1
>
> # ping -c1 192.168.0.2 -t 42
> IP (tos 0x0, ttl 41, id 61647, offset 0, flags [DF], proto ICMP (1), length 84)
> 192.168.0.1 > 192.168.0.2: ICMP echo request, id 386, seq 1, length 64
> # ping -c1 192.168.0.2 -t 120
> IP (tos 0x0, ttl 119, id 62070, offset 0, flags [DF], proto ICMP (1), length 84)
> 192.168.0.1 > 192.168.0.2: ICMP echo request, id 388, seq 1, length 64
> # ping -c1 192.168.0.2 -t 1
> #
>
> Co-developed-by: Bindiya Kurle <bindiyakurle@gmail.com>
> Signed-off-by: Bindiya Kurle <bindiyakurle@gmail.com>
> Signed-off-by: Matteo Croce <mcroce@redhat.com>
Applied.
prev parent reply other threads:[~2020-02-17 3:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 13:20 [PATCH net-next v5] openvswitch: add TTL decrement action Matteo Croce
2020-02-16 22:22 ` Pravin Shelar
2020-02-17 3:34 ` David Miller [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200216.193457.413155281457804366.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=bindiyakurle@gmail.com \
--cc=blp@ovn.org \
--cc=dev@openvswitch.org \
--cc=jgh@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mcroce@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.dichtel@6wind.com \
--cc=nikolay@cumulusnetworks.com \
--cc=pshelar@ovn.org \
--cc=simon.horman@netronome.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).