netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] IPv4: Remove check for ipv4_is_lbcast() that will always return false
@ 2010-10-10 16:10 Andy Walls
  2010-10-12 19:28 ` David Miller
  0 siblings, 1 reply; 3+ messages in thread
From: Andy Walls @ 2010-10-10 16:10 UTC (permalink / raw)
  To: netdev
  Cc: linux-kernel, David S. Miller, Alexey Kuznetsov, James Morris,
	Patrick McHardy

In making an IPv4 routing decision, packets with an all 1's broadcast
destination are accepted as input packets, before being checked for being a
martian.  Remove the martian check for the all 1's broadcast destination
address.  Make the initial check for the all 1's broadcast destination
address easier to read.

Signed-off-by: Andy Walls <awalls@md.metrocast.net>


diff --git a/net/ipv4/route.c b/net/ipv4/route.c
index ac6559c..2b8c071 100644
--- a/net/ipv4/route.c
+++ b/net/ipv4/route.c
@@ -2124,7 +2124,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32
            ipv4_is_loopback(saddr))
                goto martian_source;
 
-       if (daddr == htonl(0xFFFFFFFF) || (saddr == 0 && daddr == 0))
+       if (ipv4_is_lbcast(daddr) || (saddr == 0 && daddr == 0))
                goto brd_input;
 
        /* Accept zero addresses only to limited broadcast;
@@ -2133,8 +2133,7 @@ static int ip_route_input_slow(struct sk_buff *skb, __be32
        if (ipv4_is_zeronet(saddr))
                goto martian_source;
 
-       if (ipv4_is_lbcast(daddr) || ipv4_is_zeronet(daddr) ||
-           ipv4_is_loopback(daddr))
+       if (ipv4_is_zeronet(daddr) || ipv4_is_loopback(daddr))
                goto martian_destination;
 
        /*



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

* Re: [PATCH] IPv4: Remove check for ipv4_is_lbcast() that will always return false
  2010-10-10 16:10 [PATCH] IPv4: Remove check for ipv4_is_lbcast() that will always return false Andy Walls
@ 2010-10-12 19:28 ` David Miller
  2010-10-18  0:25   ` Andy Walls
  0 siblings, 1 reply; 3+ messages in thread
From: David Miller @ 2010-10-12 19:28 UTC (permalink / raw)
  To: awalls; +Cc: netdev, linux-kernel, kuznet, jmorris, kaber

From: Andy Walls <awalls@md.metrocast.net>
Date: Sun, 10 Oct 2010 12:10:21 -0400

> In making an IPv4 routing decision, packets with an all 1's broadcast
> destination are accepted as input packets, before being checked for being a
> martian.  Remove the martian check for the all 1's broadcast destination
> address.  Make the initial check for the all 1's broadcast destination
> address easier to read.
> 
> Signed-off-by: Andy Walls <awalls@md.metrocast.net>

Your email client corrupted this patch, by turning tab characters
into spaces, amongst other things.

Please give Documentation/email-clients.txt a read and resubmit this
patch after you have these issues sorted out.

Thank you.

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

* Re: [PATCH] IPv4: Remove check for ipv4_is_lbcast() that will always return false
  2010-10-12 19:28 ` David Miller
@ 2010-10-18  0:25   ` Andy Walls
  0 siblings, 0 replies; 3+ messages in thread
From: Andy Walls @ 2010-10-18  0:25 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, linux-kernel, kuznet, jmorris, kaber

On Tue, 2010-10-12 at 12:28 -0700, David Miller wrote:
> From: Andy Walls <awalls@md.metrocast.net>
> Date: Sun, 10 Oct 2010 12:10:21 -0400
> 
> > In making an IPv4 routing decision, packets with an all 1's broadcast
> > destination are accepted as input packets, before being checked for being a
> > martian.  Remove the martian check for the all 1's broadcast destination
> > address.  Make the initial check for the all 1's broadcast destination
> > address easier to read.
> > 
> > Signed-off-by: Andy Walls <awalls@md.metrocast.net>
> 
> Your email client corrupted this patch, by turning tab characters
> into spaces, amongst other things.


No, that was me in a rush, thoughtlessly cutting and pasting into the
e-mail client window.

I will resubmit shortly.  Sorry for the wasting your time on the
malformed submission.

Regards,
Andy

> Please give Documentation/email-clients.txt a read and resubmit this
> patch after you have these issues sorted out.
> 
> Thank you.

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

end of thread, other threads:[~2010-10-18  0:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-10 16:10 [PATCH] IPv4: Remove check for ipv4_is_lbcast() that will always return false Andy Walls
2010-10-12 19:28 ` David Miller
2010-10-18  0:25   ` Andy Walls

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