Skip to content

Commit 8b097c7

Browse files
committed
commit 33c7808
Author: Afshin Paydar <afshin.paydar@deriv.com> Date: Wed Sep 24 09:25:39 2025 +0800 Issue: Linux Implementation(pcap-linux.c): The iface_get_ts_types function silently ignoring ENODEV errors during interface timestamp capability checking, allowing permission errors to bereported later during socket operations Fixes: return PCAP_ERROR_NO_SUCH_DEVICE when encountering ENODEV, instead of ignoring the error Signed-off-by: Afshin Paydar <afshin.paydar@deriv.com>
1 parent 5fc0c26 commit 8b097c7

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

pcap-linux.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5164,13 +5164,13 @@ iface_get_ts_types(const char *device, pcap_t *handle, char *ebuf)
51645164

51655165
case ENODEV:
51665166
/*
5167-
* OK, no such device.
5168-
* The user will find that out when they try to
5169-
* activate the device; just return an empty
5170-
* list of time stamp types.
5167+
* No such device.
5168+
*
5169+
* There's nothing more to say, so clear the
5170+
* error message.
51715171
*/
5172-
handle->tstamp_type_list = NULL;
5173-
return 0;
5172+
ebuf[0] = '\0';
5173+
return PCAP_ERROR_NO_SUCH_DEVICE;
51745174

51755175
default:
51765176
/*

0 commit comments

Comments
 (0)