mirror of
https://github.com/dtaht/unicast-extensions.git
synced 2024-05-11 05:55:07 +00:00
Let's have a directory for useful patches for people to apply themselves
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
From 323c87d4c2de7598ac810632450816732056b111 Mon Sep 17 00:00:00 2001
|
||||
From: Seth Schoen <[email protected]>
|
||||
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 <[email protected]>
|
||||
Suggested-by: John Gilmore <[email protected]>
|
||||
---
|
||||
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
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
This directory contains patches which are probably not going to be merged
|
||||
upstream for various reasons (or were not merged upstream in time for
|
||||
particular software releases), but if you're building a relevant software
|
||||
version yourself, you can still make use of them.
|
||||
|
||||
* 0001-Backport-5.14-lowest-address-is-not-broadcast.patch
|
||||
|
||||
This patch is included with Linux 5.14 and later, and makes the lowest
|
||||
address on an IPv4 segment non-broadcast. You can apply this version
|
||||
to a Linux 5.10 LTS kernel (or likely to other kernel versions prior
|
||||
to 5.14).
|
||||
Reference in New Issue
Block a user