Skip to content

interface names can include non-word characters#1

Open
JensErat wants to merge 1 commit intopvcbe:masterfrom
JensErat:ifname-fixup
Open

interface names can include non-word characters#1
JensErat wants to merge 1 commit intopvcbe:masterfrom
JensErat:ifname-fixup

Conversation

@JensErat
Copy link
Copy Markdown

Interface names are not restricted to word characters. This discussions
indicates pretty arbitrary characters are allowed, checking for non-space
characters should be sufficient for this script.

https://unix.stackexchange.com/q/451368/40798

Additionally, allows setting a different timeout and improves error handling
("bash strict mode") with required changes (default undeclared variables).

If you prefer split commits/PRs, please drop a note or just pick whatever changes you agree to.

@JensErat
Copy link
Copy Markdown
Author

Maybe some remark; this will error out of the script for the first failed wireguard refresh (ie., DNS name not resolveable). This might be desired or not, and can surely be changed by adding some error handling. For me, the "error out" behavior was totally fine, because this way I realize the refresh and wireguard tunnel is broken by looking at the unit state.

Interface names are not restricted to word characters. This discussions
indicates pretty arbitrary characters are allowed, checking for non-space
characters should be sufficient for this script.

https://unix.stackexchange.com/q/451368/40798

Additionally, allows setting a different timeout and improves error handling
("bash strict mode") with required changes (default undeclared variables).
@pvcbe
Copy link
Copy Markdown
Owner

pvcbe commented Nov 29, 2021

Hello Jens,
thank you for your pull request.
The script is meant to enhance endpoint uptime, I think the "error out behavior" can indeed prevent this in some cases. For example with a wrong config on one endpoint can block other correct resolving endpoints.
I prefer to not "error out", a syslog message could be more informative and resiliant.
for the rest im good with the pr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants