iproute/backport-addr-Fix-noprefixroute-and-autojoin-for-IPv4.patch
2023-12-28 20:08:02 +08:00

44 lines
1.8 KiB
Diff

From be1bea843234878a936fdf854e511053d528bf75 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Tue, 6 Oct 2020 15:15:56 -0700
Subject: addr: Fix noprefixroute and autojoin for IPv4
These were reported as IPv6-only and ignored:
# ip address add 192.0.2.2/24 dev dummy5 noprefixroute
Warning: noprefixroute option can be set only for IPv6 addresses
# ip address add 224.1.1.10/24 dev dummy5 autojoin
Warning: autojoin option can be set only for IPv6 addresses
This enables them back for IPv4.
Fixes: 9d59c86e575b5 ("iproute2: ip addr: Organize flag properties structurally")
Signed-off-by: Adel Belhouane <bugs.a.b@free.fr>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Conflict:NA
Reference:https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit?id=be1bea843234878a936fdf854e511053d528bf75
---
ip/ipaddress.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ip/ipaddress.c b/ip/ipaddress.c
index ccf67d1dd..2b4cb48a4 100644
--- a/ip/ipaddress.c
+++ b/ip/ipaddress.c
@@ -1249,8 +1249,8 @@ static const struct ifa_flag_data_t {
{ .name = "tentative", .mask = IFA_F_TENTATIVE, .readonly = true, .v6only = true},
{ .name = "permanent", .mask = IFA_F_PERMANENT, .readonly = true, .v6only = true},
{ .name = "mngtmpaddr", .mask = IFA_F_MANAGETEMPADDR, .readonly = false, .v6only = true},
- { .name = "noprefixroute", .mask = IFA_F_NOPREFIXROUTE, .readonly = false, .v6only = true},
- { .name = "autojoin", .mask = IFA_F_MCAUTOJOIN, .readonly = false, .v6only = true},
+ { .name = "noprefixroute", .mask = IFA_F_NOPREFIXROUTE, .readonly = false, .v6only = false},
+ { .name = "autojoin", .mask = IFA_F_MCAUTOJOIN, .readonly = false, .v6only = false},
{ .name = "stable-privacy", .mask = IFA_F_STABLE_PRIVACY, .readonly = true, .v6only = true},
};
--
cgit 1.2.3-korg