mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 04:18:39 +08:00
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>
This commit is contained in:
parent
100465a91a
commit
de67763cbd
@ -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;
|
||||
|
||||
/*
|
||||
|
@ -703,8 +703,6 @@ errout:
|
||||
return err;
|
||||
}
|
||||
|
||||
#define INFINITY_LIFE_TIME 0xFFFFFFFF
|
||||
|
||||
static void check_lifetime(struct work_struct *work)
|
||||
{
|
||||
unsigned long now, next, next_sec, next_sched;
|
||||
|
@ -92,8 +92,6 @@
|
||||
#include <linux/export.h>
|
||||
#include <linux/ioam6.h>
|
||||
|
||||
#define INFINITY_LIFE_TIME 0xFFFFFFFF
|
||||
|
||||
#define IPV6_MAX_STRLEN \
|
||||
sizeof("ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255")
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user