From: Dan Williams <dcbw@redhat•com>
To: David Miller <davem@davemloft•net>
Cc: maheshb@google•com, netdev@vger•kernel.org, jbenc@redhat•com
Subject: Re: [PATCH] ipvlan: fix up broadcast MAC filtering for ARP and DHCP
Date: Thu, 02 Apr 2015 13:46:35 -0500 [thread overview]
Message-ID: <1428000395.5282.40.camel@redhat.com> (raw)
In-Reply-To: <1427999967.5282.39.camel@redhat.com>
On Thu, 2015-04-02 at 13:39 -0500, Dan Williams wrote:
> On Thu, 2015-04-02 at 14:16 -0400, David Miller wrote:
> > From: Dan Williams <dcbw@redhat•com>
> > Date: Mon, 30 Mar 2015 23:22:50 -0500
> >
> > > + case htons(ETH_P_ALL): {
> > > + /* Raw sockets */
> > > + if (eth_hdr(skb)->h_proto != htons(ETH_P_IP))
> > > + break;
> > > + /* Fall through */
> > > + }
> >
> > You are not declaring any local variables in this switch block, therefore
> > there is no reason to surround it with curly braces, remove them.
> >
> > > + if (skb->len < DHCP_PACKET_MIN_LEN || ip4h->protocol != IPPROTO_UDP
> > > + || ip_is_fragment(ip4h))
> > > + return false;
> >
> > This is not formatted properly.
> >
> > Lines of conditional statements _END_ with operators, they should never
> > begin with one.
> >
> > Also, the second and subsequent lines of a multi-line if() statement should
> > begin precisely at the first column after the openning parenthesis of the
> > first line. You must use the appropriate number of TAB then SPACE characters
> > to achieve this.
> >
> > If you are purely using TAB characters to indent these things, it is almost
> > certain that you are doing it wrong.
> >
> > And yes, I am super sick of typing this in several times a day, especially
> > when this is not only documented, but checked for by checkpatch and other
> > automated tools.
> >
> > > + lyr3h = ipvlan_get_L3_hdr(skb, &addr_type);
> > > + if (!ipvlan->dhcp4_seen && lyr3h && addr_type == IPVL_IPV4
> > > + && is_dhcp(skb)) {
> >
> > Likewise.
>
> I'm sorry about that, and I will fix style/indent and re-post once
> Mahesh and I have agreed on the exact behavior here.
It also conflicts with Jiri Benc's patches that you applied, so I need
to fix that up too.
Dan
prev parent reply other threads:[~2015-04-02 18:46 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-26 22:41 [PATCH 1/2] ipvlan: don't loose broadcast MAC when setting MAC filters Dan Williams
2015-03-26 22:43 ` [PATCH 2/2] ipvlan: always allow the broadcast MAC address Dan Williams
2015-03-27 17:46 ` Jiri Benc
2015-03-28 0:52 ` Mahesh Bandewar
2015-03-28 5:56 ` Mahesh Bandewar
2015-03-28 18:32 ` Jiri Benc
2015-03-30 14:37 ` Dan Williams
2015-03-30 16:54 ` Mahesh Bandewar
2015-03-30 17:44 ` Dan Williams
2015-03-30 17:56 ` Mahesh Bandewar
2015-03-30 18:13 ` Dan Williams
2015-03-30 18:32 ` Mahesh Bandewar
2015-03-27 17:45 ` [PATCH 1/2] ipvlan: don't loose broadcast MAC when setting MAC filters Jiri Benc
2015-03-30 20:28 ` Mahesh Bandewar
2015-03-30 21:01 ` Dan Williams
2015-03-30 21:11 ` Mahesh Bandewar
2015-03-31 3:05 ` Dan Williams
2015-03-31 4:22 ` [PATCH] ipvlan: fix up broadcast MAC filtering for ARP and DHCP Dan Williams
2015-04-01 20:07 ` Dan Williams
2015-04-01 20:24 ` Mahesh Bandewar
2015-04-01 20:55 ` Dan Williams
2015-04-02 1:30 ` Mahesh Bandewar
2015-04-02 14:40 ` Dan Williams
2015-04-03 1:39 ` Mahesh Bandewar
2015-04-06 17:17 ` Dan Williams
2015-04-07 18:32 ` Mahesh Bandewar
2015-04-07 19:45 ` Dan Williams
2015-04-09 15:51 ` Dan Williams
2015-04-09 16:01 ` Eric Dumazet
2015-04-09 16:33 ` Mahesh Bandewar
2015-04-09 22:18 ` Dan Williams
2015-04-08 9:37 ` David Laight
2015-04-08 14:12 ` Dan Williams
2015-04-09 1:08 ` Mahesh Bandewar
2015-04-02 18:16 ` David Miller
2015-04-02 18:39 ` Dan Williams
2015-04-02 18:46 ` Dan Williams [this message]
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=1428000395.5282.40.camel@redhat.com \
--to=dcbw@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jbenc@redhat$(echo .)com \
--cc=maheshb@google$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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