Page MenuHomeFreeBSD

Fix epoch-related panic in ipdivert & refactor div_output.

Authored by melifaro on Wed, Jan 22, 2:44 PM.



Fix epoch-related panic in ipdivert, ensuring in_broadcast() is called within epoch. This got broken in r353292 back in October 2019.
As recent change requires calling in[6]_output() within epoch, it is easier to widen epoch coverage within div_output() instead of cherry-picking individual functions.

Simplify gigantic div_output() by splitting it into 3 functions, handling preliminary setup, remote "ip[6]_output" case and local "netisr" case. Leave original indenting in most parts to ease diff comparison.
Indentation will be fixed by a followup commit.

Test Plan

Tests are added separately in

Diff Detail

rS FreeBSD src repository
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

melifaro created this revision.Wed, Jan 22, 2:44 PM
bz added a reviewer: glebius.Wed, Jan 22, 2:50 PM
melifaro edited the summary of this revision. (Show Details)Wed, Jan 22, 3:03 PM
glebius accepted this revision.Thu, Jan 23, 12:50 AM
This revision is now accepted and ready to land.Thu, Jan 23, 12:50 AM