summaryrefslogtreecommitdiff
path: root/proto/l3vpn/l3vpn.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-11-25 23:42:55 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-11-25 23:42:55 +0100
commitb3d9a088ebfa43d8c0805f07715d93e8345c906e (patch)
treea3b11d2580e407b6ab4cf396312e6f2f24ab5a5a /proto/l3vpn/l3vpn.c
parent391e10e593c0fab0f3cd4ae898bf5a7c99dd395c (diff)
parentbe09b030ed40c76ee0727dd3980df77094fdc907 (diff)
Merge commit 'be09b030' into wireguard-next-tmp7-1
Diffstat (limited to 'proto/l3vpn/l3vpn.c')
-rw-r--r--proto/l3vpn/l3vpn.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/proto/l3vpn/l3vpn.c b/proto/l3vpn/l3vpn.c
index 2952f32b..8b56cd73 100644
--- a/proto/l3vpn/l3vpn.c
+++ b/proto/l3vpn/l3vpn.c
@@ -148,11 +148,6 @@ l3vpn_prepare_export_targets(struct l3vpn_proto *p)
ASSERT(p->export_target_length == len);
}
-/* Convert 64-bit RD to 32bit source ID, unfortunately it has collisions */
-static inline struct rte_src * l3vpn_get_source(struct l3vpn_proto *p, u64 rd)
-{ return rt_get_source(&p->p, (u32)(rd >> 32) ^ u32_hash(rd)); }
-//{ return p->p.main_source; }
-
static void
l3vpn_rt_notify(struct proto *P, struct channel *c0, net *net, rte *new, rte *old UNUSED)
{
@@ -182,14 +177,14 @@ l3vpn_rt_notify(struct proto *P, struct channel *c0, net *net, rte *new, rte *ol
case NET_VPN4:
net_fill_ip4(n, net4_prefix(n0), net4_pxlen(n0));
- src = l3vpn_get_source(p, ((const net_addr_vpn4 *) n0)->rd);
+ src = rt_get_source(&p->p, ((const net_addr_vpn4 *) n0)->rd);
dst = p->ip4_channel;
export = 0;
break;
case NET_VPN6:
net_fill_ip6(n, net6_prefix(n0), net6_pxlen(n0));
- src = l3vpn_get_source(p, ((const net_addr_vpn6 *) n0)->rd);
+ src = rt_get_source(&p->p, ((const net_addr_vpn6 *) n0)->rd);
dst = p->ip6_channel;
export = 0;
break;