All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ujjal Roy <royujjal@gmail.com>
To: "David S. Miller" <davem@davemloft.net>,
	Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
	James Morris <jmorris@namei.org>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	Patrick McHardy <kaber@trash.net>
Cc: Kernel <linux-kernel@vger.kernel.org>, Kernel <netdev@vger.kernel.org>
Subject: ip6mr: Indentation not proper in ip6mr_cache_report()
Date: Wed, 8 Sep 2021 07:55:45 +0530	[thread overview]
Message-ID: <CAE2MWknAvL01A9V44PaODencJpGFHuOzH36h4ry=pbgOf4B9jw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 371 bytes --]

Hi All,

Before sending the patch, I am writing this email to get your
attention please. As per my knowledge I can see ip6mr_cache_report()
has some indentation issues. Please have a look at the line 1085.
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/net/ipv6/ip6mr.c#n1085

Sharing a patch based on the latest stable Linux.

Thanks,
UjjaL Roy

[-- Attachment #2: ip6mr-ip6mr_cache_report-indent-fix.patch --]
[-- Type: application/octet-stream, Size: 1462 bytes --]

diff --git a/net/ipv6/ip6mr.c b/net/ipv6/ip6mr.c
index 36ed9efb8825..aa5b884a819e 100644
--- a/net/ipv6/ip6mr.c
+++ b/net/ipv6/ip6mr.c
@@ -1082,30 +1082,26 @@ static int ip6mr_cache_report(struct mr_table *mrt, struct sk_buff *pkt,
 	} else
 #endif
 	{
-	/*
-	 *	Copy the IP header
-	 */
+		/* Copy the IP header */
+		skb_put(skb, sizeof(struct ipv6hdr));
+		skb_reset_network_header(skb);
+		skb_copy_to_linear_data(skb, ipv6_hdr(pkt),
+					sizeof(struct ipv6hdr));
+
+		/* Add our header */
+		skb_put(skb, sizeof(*msg));
+		skb_reset_transport_header(skb);
+		msg = (struct mrt6msg *)skb_transport_header(skb);
 
-	skb_put(skb, sizeof(struct ipv6hdr));
-	skb_reset_network_header(skb);
-	skb_copy_to_linear_data(skb, ipv6_hdr(pkt), sizeof(struct ipv6hdr));
+		msg->im6_mbz = 0;
+		msg->im6_msgtype = assert;
+		msg->im6_mif = mifi;
+		msg->im6_pad = 0;
+		msg->im6_src = ipv6_hdr(pkt)->saddr;
+		msg->im6_dst = ipv6_hdr(pkt)->daddr;
 
-	/*
-	 *	Add our header
-	 */
-	skb_put(skb, sizeof(*msg));
-	skb_reset_transport_header(skb);
-	msg = (struct mrt6msg *)skb_transport_header(skb);
-
-	msg->im6_mbz = 0;
-	msg->im6_msgtype = assert;
-	msg->im6_mif = mifi;
-	msg->im6_pad = 0;
-	msg->im6_src = ipv6_hdr(pkt)->saddr;
-	msg->im6_dst = ipv6_hdr(pkt)->daddr;
-
-	skb_dst_set(skb, dst_clone(skb_dst(pkt)));
-	skb->ip_summed = CHECKSUM_UNNECESSARY;
+		skb_dst_set(skb, dst_clone(skb_dst(pkt)));
+		skb->ip_summed = CHECKSUM_UNNECESSARY;
 	}
 
 	rcu_read_lock();

             reply	other threads:[~2021-09-08  2:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08  2:25 Ujjal Roy [this message]
2021-09-08 16:33 ` ip6mr: Indentation not proper in ip6mr_cache_report() Jakub Kicinski
2021-09-09 12:28   ` Ujjal Roy

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='CAE2MWknAvL01A9V44PaODencJpGFHuOzH36h4ry=pbgOf4B9jw@mail.gmail.com' \
    --to=royujjal@gmail.com \
    --cc=davem@davemloft.net \
    --cc=jmorris@namei.org \
    --cc=kaber@trash.net \
    --cc=kuznet@ms2.inr.ac.ru \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=yoshfuji@linux-ipv6.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.