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)
Mon, Apr 22, 2:09 AM
Unknown Object (File)
Sat, Apr 20, 4:52 PM
Unknown Object (File)
Sat, Apr 20, 4:52 PM
Unknown Object (File)
Sat, Apr 20, 4:52 PM
Unknown Object (File)
Fri, Apr 19, 2:48 PM
Unknown Object (File)
Fri, Apr 19, 4:57 AM
Unknown Object (File)
Fri, Apr 19, 4:48 AM
Unknown Object (File)
Dec 27 2023, 10:12 AM
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