Page MenuHomeFreeBSD

Avoid doing multiple route lookups for the same destination IP during forwarding
ClosedPublic

Authored by eri on Jun 30 2015, 7:47 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Sep 18, 2:43 PM
Unknown Object (File)
Aug 31 2025, 2:38 AM
Unknown Object (File)
Aug 8 2025, 3:00 PM
Unknown Object (File)
Aug 2 2025, 6:27 PM
Unknown Object (File)
Aug 1 2025, 4:14 PM
Unknown Object (File)
Jul 28 2025, 4:23 AM
Unknown Object (File)
Jul 26 2025, 12:02 PM
Unknown Object (File)
Jul 25 2025, 2:36 AM
Subscribers

Details

Reviewers
ae
gnn
Group Reviewers
network
Commits
rS286025: MFC r285051
Summary

ip_forward() does a route lookup for testing this packet can be sent to a known destination,
it also can do another route lookup if it detects that an ICMP redirect is needed,
it forgets all of this and handovers to ip_output() to do the same lookup yet again.

This optimisation just does one route lookup during the forwarding path and handovers that to be considered by ip_output().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

eri retitled this revision from to Avoid doing multiple route lookups for the same destination IP during forwarding.
eri updated this object.
eri edited the test plan for this revision. (Show Details)
eri added a reviewer: network.
eri set the repository for this revision to rS FreeBSD src repository - subversion.
eri changed the edit policy from "All Users" to "committers (Project)".
This comment was removed by ae.

It looks like you introduced a route reference leak.

ae@ i think i spotted the only reference leak i missed.
If not, can you be more verbose?

ae added a reviewer: ae.

Looks correct to me.

This revision is now accepted and ready to land.Jul 2 2015, 4:18 AM
gnn edited edge metadata.

LGTM Approved for commit.

Somehow the revision is not closed automatically when setting the editing only to source committers.
Do this manually.