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)
Wed, Apr 29, 11:28 AM
Unknown Object (File)
Wed, Apr 29, 11:23 AM
Unknown Object (File)
Wed, Apr 29, 8:39 AM
Unknown Object (File)
Wed, Apr 29, 8:32 AM
Unknown Object (File)
Fri, Apr 17, 4:19 PM
Unknown Object (File)
Fri, Apr 17, 12:28 PM
Unknown Object (File)
Apr 6 2026, 12:03 PM
Unknown Object (File)
Apr 5 2026, 2:20 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