HomeFreeBSD

tcp_usr_shutdown: don't cast inp_ppcb to tcpcb before checking inp_flags

Description

tcp_usr_shutdown: don't cast inp_ppcb to tcpcb before checking inp_flags

While here move out one more erroneous condition out of the epoch and
common return. The only functional change is that if we send control
on a shut down socket we would get EINVAL instead of ECONNRESET.

Reviewed by: tuexen
Reported by: syzbot+8388cf7f401a7b6bece6@syzkaller.appspotmail.com
Fixes: f64dc2ab5be38e5366271ef85ea90d8cb1c7841a

Details

Provenance
glebiusAuthored on Dec 28 2021, 4:50 PM
Parents
rGf7926a6d0c10: net: iflib: fix vlan processing in the drivers
Branches
Unknown
Tags
Unknown