Page MenuHomeFreeBSD

libnetmap: change interface name character exclusion approach
ClosedPublic

Authored by franco_opnsense.org on Nov 6 2023, 8:38 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Nov 14, 10:39 PM
Unknown Object (File)
Thu, Nov 14, 10:33 PM
Unknown Object (File)
Thu, Nov 14, 9:54 PM
Unknown Object (File)
Thu, Nov 14, 4:08 PM
Unknown Object (File)
Sun, Nov 10, 12:46 PM
Unknown Object (File)
Sun, Nov 10, 12:40 PM
Unknown Object (File)
Tue, Nov 5, 7:02 PM
Unknown Object (File)
Oct 17 2024, 1:38 PM
Subscribers

Details

Summary

When trying to use a VLAN device (e.g. "em0.123") with a dot
the library fails to parse the interface correctly. The former
pattern is much too restrictive given that almost all characters
can be coerced into a device name via ifconfig.

Remove the particularly restrictive validation. Some characters
still cannot be used as an interface name as they are used as
delimiters in the syntax, but this allows to be able to use most
of them without an issue.

Test Plan

Tested and shipped in OPNsense 23.7.7 with Suricata version 6 and 7.

Revised approach via https://github.com/luigirizzo/netmap/pull/940

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

{ and } are missing.
Makes sense to me in general, but please also open a pull request here https://github.com/luigirizzo/netmap/
where the libnetmap developer can see it.

This revision now requires changes to proceed.Nov 8 2023, 8:18 AM
  • libnetmap: different approach as discussed on GitHub upstream
franco_opnsense.org edited the test plan for this revision. (Show Details)

Do you need me to commit this?

This revision is now accepted and ready to land.Dec 1 2023, 10:41 AM