Page MenuHomeFreeBSD

dummynet: do not store struct ifnet pointers
ClosedPublic

Authored by kp on May 19 2022, 5:00 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Jun 21, 8:27 PM
Unknown Object (File)
Fri, Jun 20, 8:11 AM
Unknown Object (File)
Wed, Jun 18, 9:44 PM
Unknown Object (File)
Mon, Jun 16, 4:18 AM
Unknown Object (File)
Thu, Jun 12, 3:40 PM
Unknown Object (File)
May 22 2025, 11:36 AM
Unknown Object (File)
May 21 2025, 11:53 PM
Unknown Object (File)
May 18 2025, 9:41 AM

Details

Summary

The dn_pkt_tag tag contained a struct ifnet pointer. If we persist that
across NET_EPOCH boundaries (as we did in dummynet) we risk panics if
the interface is removed between the packet being enqueued and it being
dequeued.

Convert the pointer into an index/generation pair and restore it when
the packet is taken out of the queue.

Sponsored by: Rubicon Communications, LLC ("Netgate")

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable