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)
Tue, Jul 7, 6:07 AM
Unknown Object (File)
Fri, Jul 3, 5:30 AM
Unknown Object (File)
Thu, Jul 2, 6:18 PM
Unknown Object (File)
Wed, Jul 1, 8:47 AM
Unknown Object (File)
Wed, Jul 1, 2:12 AM
Unknown Object (File)
Wed, Jul 1, 2:11 AM
Unknown Object (File)
Wed, Jul 1, 12:26 AM
Unknown Object (File)
Thu, Jun 25, 2:23 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