HomeFreeBSD

libnetmap: reset errno in nmreq_register_decode()

Description

libnetmap: reset errno in nmreq_register_decode()

The reset is necessary at the beginning of the function, because of
the errno logic in the error path (set errno to EINVAL if not set).
If errno is already set when calling the function, and the function
fails, the previous errno value will be inherited.

(cherry picked from commit ab639bb2873034786cd2ec4d2d9c4489fbf6f424)

Details

Provenance
vmaffioneAuthored on Apr 2 2021, 2:31 PM
Parents
rGa95578c87cd0: nemtap: lb app: Validate ihl field when hashing packet
Branches
Unknown
Tags
Unknown