From: Stephen Hemminger <stephen@networkplumber.org>
To: Roopa Prabhu <roopa@cumulusnetworks.com>
Cc: dsahern@gmail.com, netdev@vger.kernel.org
Subject: Re: [PATCH iproute2 net-next v3] iprule: support for ip_proto, sport and dport match options
Date: Tue, 6 Mar 2018 18:44:39 -0800 [thread overview]
Message-ID: <20180306184439.1a93d7d4@xeon-e3> (raw)
In-Reply-To: <1520388479-15520-1-git-send-email-roopa@cumulusnetworks.com>
On Tue, 6 Mar 2018 18:07:59 -0800
Roopa Prabhu <roopa@cumulusnetworks.com> wrote:
> + if (tb[FRA_IP_PROTO]) {
> + SPRINT_BUF(pbuf);
> + fprintf(fp, "ip_proto %s ",
> + inet_proto_n2a(rta_getattr_u8(tb[FRA_IP_PROTO]), pbuf,
> + sizeof(pbuf)));
> + }
> +
> + if (tb[FRA_SPORT_RANGE]) {
> + struct fib_rule_port_range *r = RTA_DATA(tb[FRA_SPORT_RANGE]);
> +
> + if (r->start == r->end)
> + fprintf(fp, "sport %hu ", r->start);
> + else
> + fprintf(fp, "sport %hu-%hu ", r->start, r->end);
> + }
> +
> + if (tb[FRA_DPORT_RANGE]) {
> + struct fib_rule_port_range *r = RTA_DATA(tb[FRA_DPORT_RANGE]);
> +
> + if (r->start == r->end)
> + fprintf(fp, "dport %hu ", r->start);
> + else
> + fprintf(fp, "dport %hu-%hu ", r->start, r->end);
> + }
> +
in net-next this is all JSON now.
next prev parent reply other threads:[~2018-03-07 2:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-03-07 2:07 [PATCH iproute2 net-next v3] iprule: support for ip_proto, sport and dport match options Roopa Prabhu
2018-03-07 2:44 ` Stephen Hemminger [this message]
2018-03-07 15:51 ` Roopa Prabhu
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=20180306184439.1a93d7d4@xeon-e3 \
--to=stephen@networkplumber.org \
--cc=dsahern@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=roopa@cumulusnetworks.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