Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fbdc0ad0 authored by Li RongQing's avatar Li RongQing Committed by David S. Miller
Browse files

ipv4: initialise the itag variable in __mkroute_input



the value of itag is a random value from stack, and may not be initiated by
fib_validate_source, which called fib_combine_itag if CONFIG_IP_ROUTE_CLASSID
is not set

This will make the cached dst uncertainty

Signed-off-by: default avatarLi RongQing <roy.qing.li@gmail.com>
Acked-by: default avatarAlexei Starovoitov <ast@plumgrid.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d0c21d43
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1519,7 +1519,7 @@ static int __mkroute_input(struct sk_buff *skb,
	struct in_device *out_dev;
	unsigned int flags = 0;
	bool do_cache;
	u32 itag;
	u32 itag = 0;

	/* get a working reference to the output device */
	out_dev = __in_dev_get_rcu(FIB_RES_DEV(*res));