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)
Mar 13 2025, 6:44 AM
Unknown Object (File)
Feb 19 2025, 9:12 PM
Unknown Object (File)
Feb 19 2025, 8:13 AM
Unknown Object (File)
Feb 19 2025, 7:34 AM
Unknown Object (File)
Feb 15 2025, 7:37 PM
Unknown Object (File)
Jan 27 2025, 5:05 PM
Unknown Object (File)
Jan 24 2025, 5:49 PM
Unknown Object (File)
Jan 5 2025, 4:39 PM

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