diff options
author | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-01-09 17:21:00 +0000 |
---|---|---|
committer | Alexander V. Chernikov <melifaro@FreeBSD.org> | 2020-01-09 17:21:00 +0000 |
commit | ead85fe415dd32e47eb57744c4b214e33ef89938 (patch) | |
tree | 9a80f413018a3af30097eed846d279d134775bbb /sys/net/radix_mpath.c | |
parent | 0b4da9c8e450132c61acbd19aa6796efe82e6105 (diff) |
Add fibnum, family and vnet pointer to each rib head.
Having metadata such as fibnum or vnet in the struct rib_head
is handy as it eases building functionality in the routing space.
This change is required to properly bring back route redirect support.
Reviewed by: bz
MFC after: 3 weeks
Differential Revision: https://reviews.freebsd.org/D23047
Notes
Notes:
svn path=/head/; revision=356559
Diffstat (limited to 'sys/net/radix_mpath.c')
-rw-r--r-- | sys/net/radix_mpath.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/net/radix_mpath.c b/sys/net/radix_mpath.c index b7a2ebe96766..2dda9d9f10eb 100644 --- a/sys/net/radix_mpath.c +++ b/sys/net/radix_mpath.c @@ -290,17 +290,17 @@ rtalloc_mpath_fib(struct route *ro, uint32_t hash, u_int fibnum) RT_UNLOCK(ro->ro_rt); } -extern int in6_inithead(void **head, int off); -extern int in_inithead(void **head, int off); +extern int in6_inithead(void **head, int off, u_int fibnum); +extern int in_inithead(void **head, int off, u_int fibnum); #ifdef INET int -rn4_mpath_inithead(void **head, int off) +rn4_mpath_inithead(void **head, int off, u_int fibnum) { struct rib_head *rnh; hashjitter = arc4random(); - if (in_inithead(head, off) == 1) { + if (in_inithead(head, off, fibnum) == 1) { rnh = (struct rib_head *)*head; rnh->rnh_multipath = 1; return 1; @@ -311,12 +311,12 @@ rn4_mpath_inithead(void **head, int off) #ifdef INET6 int -rn6_mpath_inithead(void **head, int off) +rn6_mpath_inithead(void **head, int off, u_int fibnum) { struct rib_head *rnh; hashjitter = arc4random(); - if (in6_inithead(head, off) == 1) { + if (in6_inithead(head, off, fibnum) == 1) { rnh = (struct rib_head *)*head; rnh->rnh_multipath = 1; return 1; |