public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Seth David Schoen <schoen@loyalty.org>
To: Paul Menzel <pmenzel@molgen.mpg.de>
Cc: "David S. Miller" <davem@davemloft.net>, netdev@vger.kernel.org
Subject: Re: Backporting *ip: Treat IPv4 segment's lowest address as unicast* to Linux 5.10.y?
Date: Wed, 25 Jan 2023 16:45:48 -0800	[thread overview]
Message-ID: <20230126004548.GA510532@demorgan> (raw)
In-Reply-To: <ba85381a-37dc-9e61-de71-527d686d6430@molgen.mpg.de>

Paul Menzel writes:

> Dear Linux folks,
> 
> 
> Seth backported commit 94c821c74bf5fe0c25e09df5334a16f98608db90 in OpenWrt
> [1]. Could we also add to the Linux LTS 5.10 series?

Thanks for suggesting this.  This would be something like the attached
version (which is against the 5.10 stable tree), perhaps with different
naming/commit message documentations for backporting.

I understand if this turns out to be too much like a functionality
change rather than a bugfix for 5.10; in that case, we could just
continue making it available on our own repo.


From 323c87d4c2de7598ac810632450816732056b111 Mon Sep 17 00:00:00 2001
From: Seth Schoen <schoen@loyalty.org>
Date: Sun, 22 Jan 2023 14:39:24 -0800
Subject: [PATCH] Backport 5.14: lowest-address is not broadcast

Allow the lowest address in a network segment to be used as an
ordinary unicast address, not a duplicate broadcast address.

Signed-off-by: Seth David Schoen <schoen@loyalty.org>
Suggested-by: John Gilmore <gnu@toad.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 5f786ef662ea..0b3fadc002d6 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -1129,10 +1129,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);
 			arp_invalidate(dev, prefix | ~mask, false);
-- 
2.25.1

      reply	other threads:[~2023-01-26  0:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-04 14:58 Backporting *ip: Treat IPv4 segment's lowest address as unicast* to Linux 5.10.y? Paul Menzel
2023-01-26  0:45 ` Seth David Schoen [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=20230126004548.GA510532@demorgan \
    --to=schoen@loyalty.org \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=pmenzel@molgen.mpg.de \
    /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