-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
luci-mod-network: include prefix in interface name check #7289
base: master
Are you sure you want to change the base?
Conversation
Opening as draft as there's some cases I haven't tested yet if switching the check to prefix + interface name causes any problem. I also just noticed that
|
7c7f5d9
to
2931aa2
Compare
The interface name check only considered the user input when validating the length, which could result in the actual name exceeding the kernel limit of 15 characters when the bridge/protocol prefix was included as well. For example the interface name abcdefgh1234567 was accepted as valid but with prefixes included (such as br-abcdefgh1234567 or gre-abcdefgh1234567) it exceeded the limit. Signed-off-by: Daniel Nilsson <[email protected]>
2931aa2
to
904a2cb
Compare
Just for reference, the issue (protocol name prefix) has been there for ages. |
This proved a bit harder than I first thought, since there doesn't seem to be any consistency for some virtual protocols in how they define their interface names, for example:
Short of redefining how the naming strategy works for bringing up virtual protocols' interfaces, I'm pretty sure this won't be possible to solve in an nice and concise manner. |
The interface name check only considered the user input when validating the length, which could result in the actual name exceeding the kernel limit of 15 characters when the bridge/protocol prefix was included as well. For example the interface name abcdefgh1234567 was accepted as valid but with prefixes included (such as br-abcdefgh1234567 or gre-abcdefgh1234567) it exceeded the limit.
The following interface:
Results in the following logs:
After this change:
Effective length of gre-abcdefgh123 (15 characters) is allowed.
Effective length of gre-abcdefgh1234 (16 characters) isn't allowed.
Signed-off-by: <[email protected]>
row (viagit commit --signoff
)<package name>: title
first line subject for packagesPKG_VERSION
in the Makefile