Page MenuHomeFreeBSD

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

Authored by maryse.levavasseur_stormshield.eu on Jun 27 2016, 8:47 AM.
Referenced Files
Unknown Object (File)
Thu, Apr 18, 5:11 PM
Unknown Object (File)
Fri, Apr 5, 8:21 PM
Unknown Object (File)
Fri, Apr 5, 3:28 PM
Unknown Object (File)
Mar 12 2024, 6:43 PM
Unknown Object (File)
Mar 12 2024, 6:43 PM
Unknown Object (File)
Mar 12 2024, 4:00 PM
Unknown Object (File)
Mar 8 2024, 1:09 PM
Unknown Object (File)
Mar 8 2024, 1:09 PM
Subscribers

Details

Summary

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

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

Event Timeline

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

Please upload diffs with full context (-U99999).

cem edited edge metadata.
cem added inline comments.
usr.sbin/rtadvd/if.c
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.