Page MenuHomeFreeBSD

[usr.sbin/rtadvd] optimize and secure interface lookup

Authored by on Jun 27 2016, 8:47 AM.
Referenced Files
Unknown Object (File)
Sun, Feb 4, 7:58 PM
Unknown Object (File)
Sun, Feb 4, 5:07 PM
Unknown Object (File)
Jan 13 2024, 8:41 PM
Unknown Object (File)
Dec 27 2023, 5:34 PM
Unknown Object (File)
Dec 27 2023, 5:08 PM
Unknown Object (File)
Nov 22 2023, 10:06 AM
Unknown Object (File)
Nov 22 2023, 12:12 AM
Unknown Object (File)
Nov 13 2023, 10:30 PM



In rtadvd, interface lookup calls if_indextoname() many times in a loop,
(it takes a long time on systems with many interfaces)
without reason and without checking its return value.

This is fixed by this patch.

Test Plan

Our automated tests show no regression.
This patch is already included in Stormshield Network products.

Diff Detail

rS FreeBSD src repository - subversion
Lint Not Applicable
Tests Not Applicable

Event Timeline retitled this revision from to [usr.sbin/rtadvd] optimize and secure interface lookup. edited the test plan for this revision. (Show Details)

Please upload diffs with full context (-U99999).

cem edited edge metadata.
cem added inline comments.
497 ↗(On Diff #17963)

This check was completely bogus, ugh. ifi_ifname is an array.

This revision is now accepted and ready to land.Jun 29 2016, 4:24 AM
This revision was automatically updated to reflect the committed changes.