netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Seth David Schoen <schoen@loyalty.org>
To: netdev@vger.kernel.org
Cc: John Gilmore <gnu@toad.com>, Dave Taht <dave.taht@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
	David Ahern <dsahern@kernel.org>
Subject: [RESEND PATCH net-next 1/2] ip: Treat IPv4 segment's lowest address as unicast
Date: Wed, 12 May 2021 21:37:49 -0700	[thread overview]
Message-ID: <20210513043749.GM1047389@frotz.zork.net> (raw)
In-Reply-To: <20210513043625.GL1047389@frotz.zork.net>

Treat only the highest, not the lowest, IPv4 address within a local
subnet as a broadcast address.

Signed-off-by: Seth David Schoen <schoen@loyalty.org>
Suggested-by: John Gilmore <gnu@toad.com>
Acked-by: Dave Taht <dave.taht@gmail.com>
---
 net/ipv4/fib_frontend.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 84bb707bd88d..bfb345c88271 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -1122,10 +1122,8 @@ void fib_add_ifaddr(struct in_ifaddr *ifa)
 				  prefix, ifa->ifa_prefixlen, prim,
 				  ifa->ifa_rt_priority);
 
-		/* Add network specific broadcasts, when it takes a sense */
+		/* Add the network broadcast address, when it makes sense */
 		if (ifa->ifa_prefixlen < 31) {
-			fib_magic(RTM_NEWROUTE, RTN_BROADCAST, prefix, 32,
-				  prim, 0);
 			fib_magic(RTM_NEWROUTE, RTN_BROADCAST, prefix | ~mask,
 				  32, prim, 0);
 		}
-- 
2.25.1


  reply	other threads:[~2021-05-13  4:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-13  4:36 [RESEND PATCH net-next 0/2] Treat IPv4 lowest address as ordinary unicast address Seth David Schoen
2021-05-13  4:37 ` Seth David Schoen [this message]
2021-05-14  1:43   ` [RESEND PATCH net-next 1/2] ip: Treat IPv4 segment's lowest address as unicast David Ahern
2021-05-13  4:38 ` [RESEND PATCH net-next 2/2] selftests: Lowest IPv4 address in a subnet is valid Seth David Schoen
2021-05-14  1:43   ` David Ahern
2021-05-17 21:00 ` [RESEND PATCH net-next 0/2] Treat IPv4 lowest address as ordinary unicast address patchwork-bot+netdevbpf
  -- strict thread matches above, loose matches on Subject: below --
2021-05-05 23:25 Seth David Schoen
2021-05-05 23:28 ` [RESEND PATCH net-next 1/2] ip: Treat IPv4 segment's lowest address as unicast Seth David Schoen
2021-05-07  0:36   ` Jakub Kicinski

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=20210513043749.GM1047389@frotz.zork.net \
    --to=schoen@loyalty.org \
    --cc=dave.taht@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@kernel.org \
    --cc=gnu@toad.com \
    --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 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).