Skip to content
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

Not destroying VTI interfaces when booting before creating a new one. Fixes #10842 #4427

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

vktg
Copy link
Contributor

@vktg vktg commented Aug 19, 2020

During the booting process, we call interface_ipsec_vti_configure() from interfaces.inc multiple times :

  • From interfaces_configures() (once)
  • From vpn_ipsec_configure() (up to twice)
    When create the VTI interface we destroy it beforehand if it exists AND the system is not booting. That results in interface creation attempts when it already exists. An error ensues :

rc.bootup: The command '/sbin/ifconfig 'ipsec1000' create reqid '1000'' returned exit code '1', the output was 'ifconfig: create: bad value'

And this command takes around 20s to return this error on our hardware which is a long time, especially during the booting process.

@jim-p
Copy link
Contributor

jim-p commented Aug 19, 2020

This needs a fair amount of testing before merging. I distinctly remember the boot time check being added to prevent another issue, but it's been a while and the git history didn't offer any clues since it's been there since VTI was originally imported.

Copy link
Member

@rbgarga rbgarga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change makes sense to me. I just wonder why it's destroying and re-creating the same interface during boot. It should just create it once

@netgate-git-updates netgate-git-updates merged commit 9c6d6a0 into pfsense:master Sep 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants