HomeFreeBSD

tcp: Fix the SO_REUSEPORT_LB check

Description

tcp: Fix the SO_REUSEPORT_LB check

This needs to happen in tcp_connect() rather than tcp_usr_connect(), as
the latter is reachable by implied connect() via sendto().

Reviewed by: glebius
Reported by: syzbot+eecc86e6952fd9ba9f11@syzkaller.appspotmail.com
Fixes: c7f803c71dae ("inpcb: fix a panic with SO_REUSEPORT_LB + connect(2) misuse")
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D50893

Details