From: David Ahern <dsa@cumulusnetworks.com>
To: "Chacon, Carlos A" <carlos.chacon@gatech.edu>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Cc: "steffen.klassert@secunet.com" <steffen.klassert@secunet.com>
Subject: Re: [Patch] Fixing order of trinary operator when assigning the ifindex in XFRM Decode Session
Date: Thu, 12 Jan 2017 13:28:52 -0700 [thread overview]
Message-ID: <b6ffee14-c5ef-cec7-344a-331c142ed79c@cumulusnetworks.com> (raw)
In-Reply-To: <BY1PR0701MB12228231F8BCD74FC473284A9A790@BY1PR0701MB1222.namprd07.prod.outlook.com>
Hi Carlos:
patches sent to netdev should be plain text only. Using git send-email would be best.
Also, the Subject line should start with the area affected (e.g., net: xfrm:) and really should be a bit shorter. e.g., something like this:
[PATCH] net: xfrm: fix flow oif in decode_session
On 1/12/17 1:01 PM, Chacon, Carlos A wrote:
>
> Author: Carlos Chacon <carlos.chacon@gatech.edu>
> Date: Thu Jan 12 11:42:32 2017 -0800
>
> Fixing order of trinary operator when assigning the ifindex in XFRM Decode Session
>
> For xfrm4_policy.c:_decode_session4 and xfrm6_policy.c:_decode_session6 the line
> fl4->flowi4_oif = reverse ? skb->skb_iif : oif;
> fl6->flowi6_oif = reverse ? skb->skb_iif : oif;
> is assigning the incorrect oif to the flow_oif. It should read:
> reverse ? oif : skb->skb_iif;
> The "reverse" variable is defined in net/xfrm/xfrm_policy.c:__xfrm_policy_check
> when it checks if the dir is above the XFRM_POLICY_MASK if this returns false
> it reverses the ifindex, but it should only reverse if it returns true.
The above explanation suggests the reverse flag in __xfrm_policy_check should be fixed. Can you check that and maybe __xfrm_policy_check2 as well?
parent reply other threads:[~2017-01-12 20:28 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <BY1PR0701MB12228231F8BCD74FC473284A9A790@BY1PR0701MB1222.namprd07.prod.outlook.com>]
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=b6ffee14-c5ef-cec7-344a-331c142ed79c@cumulusnetworks.com \
--to=dsa@cumulusnetworks.com \
--cc=carlos.chacon@gatech.edu \
--cc=netdev@vger.kernel.org \
--cc=steffen.klassert@secunet.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