lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1427999967.5282.39.camel@redhat.com>
Date:	Thu, 02 Apr 2015 13:39:27 -0500
From:	Dan Williams <dcbw@...hat.com>
To:	David Miller <davem@...emloft.net>
Cc:	maheshb@...gle.com, netdev@...r.kernel.org, jbenc@...hat.com
Subject: Re: [PATCH] ipvlan: fix up broadcast MAC filtering for ARP and DHCP

On Thu, 2015-04-02 at 14:16 -0400, David Miller wrote:
> From: Dan Williams <dcbw@...hat.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.

Dan

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ