-
Notifications
You must be signed in to change notification settings - Fork 17
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
Establish hook not always called on connect #26
Comments
The on-establish hook is not run when renewing an existing connection; this is expected. Unfortunately is it sometimes necessary to tear down and recreate L2TP offload interfaces even for a renewal, as some settings can't be changed for existing L2TP interfaces. For interface setup, use on-up, which is called each time an interface is created (and for each peer in TUN and Multi-TAP mode). Note that on-up is currently not passed all environment variables that on-establish gets (in particular, no IP address and port information). This is unlikely to be an issue in practice, as this information is fairly useless with on-establish as well for anything but logging purposes, as addresses and ports may change without on-establish being called again... |
What would be the appropriate hook to clean up after disconnect/timeout? Thinking of setting link down, nomaster and removing the link, or is that entirely pointless? The documentation on when these hooks are called is slightly unintuitive. |
Hmm yes, I think some of the documentation predates the multi-interface modes of fastd and could use some updates and clarification... The rules are:
on-down is usually the right place for cleanup, if there is anything that isn't cleaned up simply by the interface disappearing. |
Maybe it would be a good idea to deprecate on-establish/on-disestablish in TUN and Multi-TAP modes to reduce confusion, and possibly extend peer-specific on-up/on-down to include the same environment as on-establish/on-disestablish currently do. Edit: This only makes sense when |
Every day the offloader in our hackspace reconnects to a gateway and the link ends up down, because the establish hook is not called. This connection always uses
null@l2tp
and we are using a multitap setup.The configuration roughly looks like this:
and a successful connect looks like so:
The text was updated successfully, but these errors were encountered: