Page MenuHomeFreeBSD

dummynet: do not store struct ifnet pointers
ClosedPublic

Authored by kp on May 19 2022, 5:00 PM.
Tags
None
Referenced Files
F151157110: D35256.id106203.diff
Mon, Apr 6, 12:03 PM
Unknown Object (File)
Sun, Apr 5, 2:20 AM
Unknown Object (File)
Sun, Apr 5, 1:35 AM
Unknown Object (File)
Sun, Mar 22, 8:04 AM
Unknown Object (File)
Sun, Mar 22, 7:56 AM
Unknown Object (File)
Sun, Mar 22, 7:48 AM
Unknown Object (File)
Sun, Mar 8, 10:14 AM
Unknown Object (File)
Mar 7 2026, 9: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