summaryrefslogtreecommitdiffstats
path: root/include/net/addrconf.h
diff options
context:
space:
mode:
authorKuniyuki Iwashima <kuniyu@amazon.com>2024-08-10 01:54:06 +0200
committerJakub Kicinski <kuba@kernel.org>2024-08-16 03:56:14 +0200
commitde67763cbdbba8149eeb5d45ad0c6834f7c7b352 (patch)
tree348c5b7f60ffd113075462112e6a3aa92fd417a0 /include/net/addrconf.h
parentipv4: Initialise ifa->hash in inet_alloc_ifa(). (diff)
downloadlinux-de67763cbdbba8149eeb5d45ad0c6834f7c7b352.tar.xz
linux-de67763cbdbba8149eeb5d45ad0c6834f7c7b352.zip
ip: Move INFINITY_LIFE_TIME to addrconf.h.
INFINITY_LIFE_TIME is the common value used in IPv4 and IPv6 but defined in both .c files. Also, 0xffffffff used in addrconf_timeout_fixup() is INFINITY_LIFE_TIME. Let's move INFINITY_LIFE_TIME's definition to addrconf.h Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com> Link: https://patch.msgid.link/20240809235406.50187-6-kuniyu@amazon.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'include/net/addrconf.h')
-rw-r--r--include/net/addrconf.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/net/addrconf.h b/include/net/addrconf.h
index b18e81f0c9e1..c8ed31828db3 100644
--- a/include/net/addrconf.h
+++ b/include/net/addrconf.h
@@ -187,10 +187,12 @@ static inline int addrconf_ifid_eui48(u8 *eui, struct net_device *dev)
return 0;
}
+#define INFINITY_LIFE_TIME 0xFFFFFFFF
+
static inline unsigned long addrconf_timeout_fixup(u32 timeout,
unsigned int unit)
{
- if (timeout == 0xffffffff)
+ if (timeout == INFINITY_LIFE_TIME)
return ~0UL;
/*