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

Commit 75ce7cea authored by Eric Dumazet's avatar Eric Dumazet Committed by David S. Miller
Browse files

[NET]: Introduce union in struct dst_entry to hold 'next' pointer



This patch introduces an anonymous union to nicely express the fact that all
objects inherited from struct dst_entry should access to the generic 'next'
pointer but with appropriate type verification.

This patch is a prereq before following patches.

Signed-off-by: default avatarEric Dumazet <dada1@cosmosbay.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f7b14315
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -37,7 +37,12 @@ struct sk_buff;

struct dst_entry
{
	union {
		struct dst_entry *next;
		struct rtable    *rt_next;
		struct rt6_info   *rt6_next;
		struct dn_route  *dn_next;
	};
	atomic_t		__refcnt;	/* client references	*/
	int			__use;
	struct dst_entry	*child;