summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_output.c
diff options
context:
space:
mode:
authorpascoe <pascoe@openbsd.org>2006-06-18 11:47:45 +0000
committerpascoe <pascoe@openbsd.org>2006-06-18 11:47:45 +0000
commit2488623969a51ee71a3fcfe09e593f0e77293ac2 (patch)
tree8e3cdc3d1f7d4c619f224b3884e47fadbc521a41 /sys/netinet/ip_output.c
parentclean up some gotos. Originally from Andrey Matveev <evol at online (diff)
downloadwireguard-openbsd-2488623969a51ee71a3fcfe09e593f0e77293ac2.tar.xz
wireguard-openbsd-2488623969a51ee71a3fcfe09e593f0e77293ac2.zip
Add support for equal-cost multipath IP.
To minimise path disruptions, this implements recommendations made in RFC2992 - the hash-threshold mechanism to select paths based on source/destination IP address pairs, and inserts multipath routes in the middle of the route table. To enable multipath distribution, use: sysctl net.inet.ip.multipath=1 and/or: sysctl net.inet6.ip6.multipath=1 testing norby@ ok claudio@ henning@ hshoexer@
Diffstat (limited to 'sys/netinet/ip_output.c')
-rw-r--r--sys/netinet/ip_output.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ip_output.c b/sys/netinet/ip_output.c
index e241fea438f..65e8698445f 100644
--- a/sys/netinet/ip_output.c
+++ b/sys/netinet/ip_output.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ip_output.c,v 1.179 2006/06/06 15:19:15 deraadt Exp $ */
+/* $OpenBSD: ip_output.c,v 1.180 2006/06/18 11:47:45 pascoe Exp $ */
/* $NetBSD: ip_output.c,v 1.28 1996/02/13 23:43:07 christos Exp $ */
/*
@@ -219,7 +219,7 @@ ip_output(struct mbuf *m0, ...)
IFP_TO_IA(ifp, ia);
} else {
if (ro->ro_rt == 0)
- rtalloc(ro);
+ rtalloc_mpath(ro, NULL, 0);
if (ro->ro_rt == 0) {
ipstat.ips_noroute++;
@@ -386,7 +386,7 @@ ip_output(struct mbuf *m0, ...)
IFP_TO_IA(ifp, ia);
} else {
if (ro->ro_rt == 0)
- rtalloc(ro);
+ rtalloc_mpath(ro, &ip->ip_src.s_addr, 0);
if (ro->ro_rt == 0) {
ipstat.ips_noroute++;