Skip to content

Commit f424b6c

Browse files
committed
pcap_setsampling(): set the error string if sampling isn't supported.
1 parent 706f8ff commit f424b6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pcap.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5028,11 +5028,13 @@ pcap_open(const char *source, int snaplen, int flags, int read_timeout,
50285028
}
50295029

50305030
struct pcap_samp *
5031-
pcap_setsampling(pcap_t *p _USED_FOR_REMOTE)
5031+
pcap_setsampling(pcap_t *p)
50325032
{
50335033
#ifdef ENABLE_REMOTE
50345034
return (&p->rmt_samp);
50355035
#else
5036+
pcap_strlcpy(p->errbuf, "Capture sampling is not supported",
5037+
PCAP_ERRBUF_SIZE);
50365038
return (NULL);
50375039
#endif
50385040
}

0 commit comments

Comments
 (0)