[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAJieiUgA5NEt-n8+s-BMSpRAc2cf_jEwVbffXxZTBamgJ_HAgA@mail.gmail.com>
Date: Wed, 7 Mar 2018 07:51:10 -0800
From: Roopa Prabhu <roopa@...ulusnetworks.com>
To: Stephen Hemminger <stephen@...workplumber.org>
Cc: David Ahern <dsahern@...il.com>, netdev@...r.kernel.org
Subject: Re: [PATCH iproute2 net-next v3] iprule: support for ip_proto, sport
and dport match options
On Tue, Mar 6, 2018 at 6:44 PM, Stephen Hemminger
<stephen@...workplumber.org> wrote:
> On Tue, 6 Mar 2018 18:07:59 -0800
> Roopa Prabhu <roopa@...ulusnetworks.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.
ok i will rebase, thanks stephen
Powered by blists - more mailing lists