jow- / nlbwmon

Simple conntrack based traffic accounting
ISC License
158 stars 37 forks source link

protocol: Include whitespace when reading names #32

Closed digitalcircuit closed 4 years ago

digitalcircuit commented 5 years ago

In short

NOTE: As I have not (yet) set up an OpenWRT build environment, this is not tested.

Criteria Rank Reason
Impact ★★☆ 2/3 User-facing fix for default protocols, matches expectations
Risk ★★☆ 2/3 Untested, could impact existing protocol name configurations
Intrusiveness ★☆☆ 1/3 Small set of changes, shouldn't interfere with other pull requests

Details

Include whitespace when reading protocol names via fscanf() by including all characters except for a newline, still limited to 32 bytes.

This fixes the new protocols added in a recent commit which include spaces in the names, and it allows for more flexibility in general.

References

NOTE: This change has not been personally tested and may need further modifications.