Patch "gre/sit: Don't generate link-local addr if addr_gen_mode is IN6_ADDR_GEN_MODE_NONE" has been added to the 4.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    gre/sit: Don't generate link-local addr if addr_gen_mode is IN6_ADDR_GEN_MODE_NONE

to the 4.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     gre-sit-don-t-generate-link-local-addr-if-addr_gen_m.patch
and it can be found in the queue-4.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 4864e3a59681140cd8a013110839ba0145c7d89d
Author: Stephen Suryaputra <ssuryaextr@xxxxxxxxx>
Date:   Wed Oct 20 16:06:18 2021 -0400

    gre/sit: Don't generate link-local addr if addr_gen_mode is IN6_ADDR_GEN_MODE_NONE
    
    [ Upstream commit 61e18ce7348bfefb5688a8bcd4b4d6b37c0f9b2a ]
    
    When addr_gen_mode is set to IN6_ADDR_GEN_MODE_NONE, the link-local addr
    should not be generated. But it isn't the case for GRE (as well as GRE6)
    and SIT tunnels. Make it so that tunnels consider the addr_gen_mode,
    especially for IN6_ADDR_GEN_MODE_NONE.
    
    Do this in add_v4_addrs() to cover both GRE and SIT only if the addr
    scope is link.
    
    Signed-off-by: Stephen Suryaputra <ssuryaextr@xxxxxxxxx>
    Acked-by: Antonio Quartulli <a@xxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20211020200618.467342-1-ssuryaextr@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c
index e47d5047d5373..178a3b26f9d2c 100644
--- a/net/ipv6/addrconf.c
+++ b/net/ipv6/addrconf.c
@@ -2996,6 +2996,9 @@ static void sit_add_v4_addrs(struct inet6_dev *idev)
 	memcpy(&addr.s6_addr32[3], idev->dev->dev_addr, 4);
 
 	if (idev->dev->flags&IFF_POINTOPOINT) {
+		if (idev->cnf.addr_gen_mode == IN6_ADDR_GEN_MODE_NONE)
+			return;
+
 		addr.s6_addr32[0] = htonl(0xfe800000);
 		scope = IFA_LINK;
 		plen = 64;



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux