From 7eeb1e1c003ea704c2e9382929d7a5218025a175 Mon Sep 17 00:00:00 2001 From: 10077240 <330416470@qq.com> Date: Wed, 10 Oct 2018 07:48:32 +0800 Subject: [PATCH] Update freebsd/netinet/in_pcb.c BSD's socket can bind the address not belong to local ports, this works well when using as transparent proxy. If fstack check the ip and port whenever new connect, tranparent proxy is not supported. When using specified local port, it is app's responsibility to make 5-tuple rss hash good. --- freebsd/netinet/in_pcb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/freebsd/netinet/in_pcb.c b/freebsd/netinet/in_pcb.c index 407cc59f2..37d65330a 100644 --- a/freebsd/netinet/in_pcb.c +++ b/freebsd/netinet/in_pcb.c @@ -1114,6 +1114,7 @@ in_pcbconnect_setup(struct inpcb *inp, struct sockaddr *nam, return (error); } #else +if (lport == 0) { struct ifaddr *ifa; struct ifnet *ifp;