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)
Thu, Sep 17, 4:14 PM
Unknown Object (File)
Thu, Sep 17, 1:27 AM
Unknown Object (File)
Wed, Sep 16, 9:44 AM
Unknown Object (File)
Tue, Sep 15, 5:29 AM
Unknown Object (File)
Wed, Sep 9, 11:33 PM
Unknown Object (File)
Wed, Sep 9, 12:28 AM
Unknown Object (File)
Tue, Sep 8, 7:52 PM
Unknown Object (File)
Tue, Sep 8, 7:28 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