Date: Sat, 26 Oct 2019 16:53:29 +0000 From: k simon <moremore2@outlook.com> To: "Andrey V. Elsukov" <bu7cher@yandex.ru>, "freebsd-net@freebsd.org" <freebsd-net@freebsd.org> Subject: =?gb2312?B?u9i4tDogSG93IHRvIGRpc2FibGUgdHJ5Zm9yd2FyZCA/?= Message-ID: <SG2PR03MB3212D9A495D60161DBA66C02EE640@SG2PR03MB3212.apcprd03.prod.outlook.com> In-Reply-To: <aa7a2050-1635-d68e-fb6f-62663156be84@yandex.ru> References: <HK0PR03MB32026778B9D469798DBF9326EE680@HK0PR03MB3202.apcprd03.prod.outlook.com>, <aa7a2050-1635-d68e-fb6f-62663156be84@yandex.ru>
next in thread | previous in thread | raw e-mail | index | archive | help
Enable "net.inet.ip.redirect" or patched ip_fastfwd.c tryforward() with "return m;" ,I've tested it yet, but ECMP is not sucessed. Even tried patched ip_input.c with :
--- ip_input.c.orig 2019-10-26 20:33:21.468834000 +0800
+++ ip_input.c 2019-10-26 20:05:57.523372000 +0800
@@ -566,6 +566,7 @@
* case skip another inbound firewall processing and update
* ip pointer.
*/
+#ifndef RADIX_MPATH
if (V_ipforwarding != 0 && V_ipsendredirects == 0
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
&& (!IPSEC_ENABLED(ipv4) ||
@@ -580,6 +581,7 @@
goto ours;
}
}
+#endif
#if defined(IPSEC) || defined(IPSEC_SUPPORT)
/*
But it's strange, packets from local do ECMP as expect, other packets (not local, just forward) stick to the first route entry as before. Maybe the problem is not only related with tryforwad().
# uname -a
FreeBSD orignal 12.1-STABLE FreeBSD 12.1-STABLE #0 r354079M: Sat Oct 26 19:17:03 CST 2019 root@orignal:/usr/obj/usr/src/amd64.amd64/sys/fb12-r354016-v4 amd64
Simon Ke
20191026
________________________________
发件人: Andrey V. Elsukov <bu7cher@yandex.ru>
发送时间: 2019年10月25日 11:31
收件人: k simon <moremore2@outlook.com>; freebsd-net@freebsd.org <freebsd-net@freebsd.org>
主题: Re: How to disable tryforward ?
On 22.10.2019 08:38, k simon wrote:
> Hi,
> Tryforwad have merged 3 yeas ago, and it haven’t a sysctl to disable it , so ECMP was broken past 3 years. Olivier has fired a bug : https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225792 , it seems that a few of people cares it.
> Andrey said maybe some ipsec policy can disable tryforward.( https://lists.freebsd.org/pipermail/freebsd-net/2017-February/047203.html. ) I have tried a lot configurations, but failed. Can someone point it out ?
> Thanks!
AFAIR, tryforward was disabled by default later.
You need to disable icmpredirects to enable tryforward. So, if you don't
need tryforward, just enable ICMP redirects.
--
WBR, Andrey V. Elsukov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?SG2PR03MB3212D9A495D60161DBA66C02EE640>
