Skip to content

Conversation

@sysvinit
Copy link
Contributor

@sysvinit sysvinit commented Jul 9, 2024

Following up #1273, this change adds a backwards compatibility note to the pcap-filter manual page for the vxlan keyword, and adds an entry to the changelog for this feature.

@guyharris guyharris merged commit 9145d31 into the-tcpdump-group:master Jul 11, 2024
afshin-paydar pushed a commit to afshin-paydar/libpcap that referenced this pull request Sep 24, 2025
  When attempting to open a non-existent network interface on Linux,
  libpcap would return PCAP_ERROR_PERM_DENIED instead of the correct
  PCAP_ERROR_NO_SUCH_DEVICE. This occurred because the privileged
  socket(PF_PACKET, SOCK_RAW, 0) call in setup_socket() would fail
  with permission errors before interface validation could occur.

  This fix adds an interface existence check using an unprivileged
  AF_INET socket and SIOCGIFINDEX ioctl before attempting to create
  the privileged packet socket. Non-existent interfaces now correctly
  return PCAP_ERROR_NO_SUCH_DEVICE.

  This resolves the issue where applications like tcpdump would report
  "Permission denied" instead of "No such device exists" for non-existent
  interfaces, breaking their fallback logic from interface names to indices.

  Note: BSD/macOS platforms have the same underlying issue where BPF device
  access fails with permission errors before interface validation. This
  should be addressed in a separate commit.

  Fixes: libpcap issue the-tcpdump-group#1538
  Related: tcpdump issue the-tcpdump-group#1334

Signed-off-by: Afshin Paydar <afshin.paydar@deriv.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants