netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net v2 2/2] mpls: fix mpls route deletes to not check for route scope
@ 2015-05-27 18:37 Roopa Prabhu
  2015-05-27 19:46 ` Robert Shearman
  2015-06-01 22:58 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Roopa Prabhu @ 2015-05-27 18:37 UTC (permalink / raw)
  To: ebiederm; +Cc: davem, rshearma, netdev, vivek

From: Roopa Prabhu <roopa@cumulusnetworks.com>

Ignore scope for route del messages

Signed-off-by: Vivek Venkataraman <vivek@cumulusnetworks.com>
Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
---
 net/mpls/af_mpls.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
index 7b3f732..f4eb0dd 100644
--- a/net/mpls/af_mpls.c
+++ b/net/mpls/af_mpls.c
@@ -693,8 +693,10 @@ static int rtm_to_route_config(struct sk_buff *skb,  struct nlmsghdr *nlh,
 	 * (or source specific address in the case of multicast)
 	 * all addresses have universal scope.
 	 */
-	if (rtm->rtm_scope != RT_SCOPE_UNIVERSE)
-		goto errout;
+	if (nlh->nlmsg_type != RTM_DELROUTE &&
+		rtm->rtm_scope != RT_SCOPE_UNIVERSE)
+			goto errout;
+
 	if (rtm->rtm_type != RTN_UNICAST)
 		goto errout;
 	if (rtm->rtm_flags != 0)
-- 
1.7.10.4

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

* Re: [PATCH net v2 2/2] mpls: fix mpls route deletes to not check for route scope
  2015-05-27 18:37 [PATCH net v2 2/2] mpls: fix mpls route deletes to not check for route scope Roopa Prabhu
@ 2015-05-27 19:46 ` Robert Shearman
  2015-06-01 22:58 ` David Miller
  1 sibling, 0 replies; 4+ messages in thread
From: Robert Shearman @ 2015-05-27 19:46 UTC (permalink / raw)
  To: Roopa Prabhu, ebiederm; +Cc: davem, netdev, vivek

On 27/05/15 19:37, Roopa Prabhu wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
>
> Ignore scope for route del messages
>
> Signed-off-by: Vivek Venkataraman <vivek@cumulusnetworks.com>
> Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>

Reviewed-by: Robert Shearman <rshearma@brocade.com>

> ---
>   net/mpls/af_mpls.c |    6 ++++--
>   1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/net/mpls/af_mpls.c b/net/mpls/af_mpls.c
> index 7b3f732..f4eb0dd 100644
> --- a/net/mpls/af_mpls.c
> +++ b/net/mpls/af_mpls.c
> @@ -693,8 +693,10 @@ static int rtm_to_route_config(struct sk_buff *skb,  struct nlmsghdr *nlh,
>   	 * (or source specific address in the case of multicast)
>   	 * all addresses have universal scope.
>   	 */
> -	if (rtm->rtm_scope != RT_SCOPE_UNIVERSE)
> -		goto errout;
> +	if (nlh->nlmsg_type != RTM_DELROUTE &&
> +		rtm->rtm_scope != RT_SCOPE_UNIVERSE)
> +			goto errout;
> +
>   	if (rtm->rtm_type != RTN_UNICAST)
>   		goto errout;
>   	if (rtm->rtm_flags != 0)
>

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

* Re: [PATCH net v2 2/2] mpls: fix mpls route deletes to not check for route scope
  2015-05-27 18:37 [PATCH net v2 2/2] mpls: fix mpls route deletes to not check for route scope Roopa Prabhu
  2015-05-27 19:46 ` Robert Shearman
@ 2015-06-01 22:58 ` David Miller
  2015-06-02 15:35   ` roopa
  1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2015-06-01 22:58 UTC (permalink / raw)
  To: roopa; +Cc: ebiederm, rshearma, netdev, vivek

From: Roopa Prabhu <roopa@cumulusnetworks.com>
Date: Wed, 27 May 2015 11:37:05 -0700

> -	if (rtm->rtm_scope != RT_SCOPE_UNIVERSE)
> -		goto errout;
> +	if (nlh->nlmsg_type != RTM_DELROUTE &&
> +		rtm->rtm_scope != RT_SCOPE_UNIVERSE)
> +			goto errout;
> +

This is not indented correctly.

When a conditional spans multiple lines, two things must happen:

1) Each line must end with an operator rather than begin with one.

2) Each line starting with the second must start exactly at the
   first column after the openning parenthesis of the conditional.
   You must use the appropriate number of TAB then SPACE characters
   necessary to achieve this.

Thanks.

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

* Re: [PATCH net v2 2/2] mpls: fix mpls route deletes to not check for route scope
  2015-06-01 22:58 ` David Miller
@ 2015-06-02 15:35   ` roopa
  0 siblings, 0 replies; 4+ messages in thread
From: roopa @ 2015-06-02 15:35 UTC (permalink / raw)
  To: David Miller; +Cc: ebiederm, rshearma, netdev, vivek

On 6/1/15, 3:58 PM, David Miller wrote:
> From: Roopa Prabhu <roopa@cumulusnetworks.com>
> Date: Wed, 27 May 2015 11:37:05 -0700
>
>> -	if (rtm->rtm_scope != RT_SCOPE_UNIVERSE)
>> -		goto errout;
>> +	if (nlh->nlmsg_type != RTM_DELROUTE &&
>> +		rtm->rtm_scope != RT_SCOPE_UNIVERSE)
>> +			goto errout;
>> +
> This is not indented correctly.
>
> When a conditional spans multiple lines, two things must happen:
>
> 1) Each line must end with an operator rather than begin with one.
>
> 2) Each line starting with the second must start exactly at the
>     first column after the openning parenthesis of the conditional.
>     You must use the appropriate number of TAB then SPACE characters
>     necessary to achieve this.
>
sorry, missed this. I have resubmitted the series. thanks.

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

end of thread, other threads:[~2015-06-02 15:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-27 18:37 [PATCH net v2 2/2] mpls: fix mpls route deletes to not check for route scope Roopa Prabhu
2015-05-27 19:46 ` Robert Shearman
2015-06-01 22:58 ` David Miller
2015-06-02 15:35   ` roopa

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).