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
F102602892: D42485.diff
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)
Thu, Oct 17, 1:38 PM
Unknown Object (File)
Thu, Oct 17, 1:38 PM
Unknown Object (File)
Thu, Oct 17, 1:38 PM
Unknown Object (File)
Thu, Oct 17, 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 Passed
Unit
No Test Coverage
Build Status
Buildable 54306
Build 51196: arc lint + arc unit

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