<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi Paul,<br>
    <br>
    Originally the "roadwarrior" set up was that one end would never
    initiate or rekey. This was done with auto=add and rekey=no, and
    possibly also setting DPD to clear (and implicitly wait for the
    other end to re-initiate). Somehow a way must be found again to stop
    the listening end initiating even if it means adding a further
    parameter. I think that the changes have introduced a significant
    interop problem and makes my conn unreliable. I hardly use it but it
    has been rekeying for days and I only noticed it because of the size
    of the log file. In my case you can even argue it is rekeying to the
    wrong IP as right is defined as %any so should not rekey to a
    specific IP address. I am pretty certain changing the behaviour is
    wrong as it can potentially break working setups (like mine). To
    change the behaviour, really another parameter should be introduced
    which defaults to allow the original behaviour.<br>
    <br>
    There are other possibilities. If an auto=add conn was started with
    and --auto up, it could default to rekeying until an auto
    --down/replace is issued in which case the behaviour reverts. This
    may mean tracking how each conn was started.<br>
    <br>
    I *think* auto=start and --down should always rekey and the conn
    would have to be replaced or deleted to permanently down it, but I
    can see arguments both ways.<br>
    <br>
    rekey=no should mean never rekey. Perhaps you could use that as the
    main flag. If set to yes, always reinitiate if a conn has been
    established, upped or started but never initiate if set to no. I am
    not sure what behaviour to expect if a conn is then downed and
    rekey=yes. I am open to arguments both ways.<br>
    <br>
    Similarly if DPD is set to clear, it should never rekey.<br>
    <br>
    Regards,<br>
    <br>
    Nick<br>
    <br>
    <div class="moz-cite-prefix">On 22/06/2017 19:57, Paul Wouters
      wrote: <br>
    </div>
    <blockquote type="cite"
      cite="mid:alpine.LRH.2.21.1706221447160.8974@bofh.nohats.ca">
      <br>
      On Thu, 22 Jun 2017, Nick Howitt wrote:
      <br>
      <br>
      <blockquote type="cite">I've just noticed something similar. I
        have a conn with auto=add and
        <br>
        rekey=no:
        <br>
      </blockquote>
      <br>
      <blockquote type="cite">I looks like it has got its knickers in a
        twist and having either lost or
        <br>
        deleted the conn, it is attempting to initiate one and retries
        every four
        <br>
        seconds. I don't think it should ever do this with auto=add and
        rekey=no.
        <br>
      </blockquote>
      <br>
      There is some understandable confusion about this. And yes this
      <br>
      behaviour has changed recently.
      <br>
      <br>
      What does auto=add plus ipsec auto --up mean? This can either mean
      that
      <br>
      the connection was loaded, and then the --up command placed the
      tunnel
      <br>
      in "must always be up" mode (aka auto=start)
      <br>
      <br>
      And the reverse, when you have auto=start and you receive a
      DELETE, do
      <br>
      you not try to bring the tunnel up (aka go into auto=add mode) or
      do you
      <br>
      immediately try to bring it up again to honour auto=start ?
      <br>
      <br>
      And what if you have auto=start but the admin give a --down
      command?
      <br>
      Should we move into auto=add or should we honour start and
      initiate
      <br>
      immediately?
      <br>
      <br>
      I've argued on different sides of this argument. I'm always happy
      to
      <br>
      hear what others think is best :)
      <br>
      <br>
      We had issues where people had auto=start, received a DELETE and
      their
      <br>
      tunnel would never try to come back up again. So we changed that
      <br>
      behaviour to immediately initiate. Now we have reports that we try
      too
      <br>
      aggressively and it is causing lots of logging and failed IKE
      attempts.
      <br>
      It is also making interoperability a litte more tricky because
      this can
      <br>
      end up in both endpoints initiating against each other more often,
      <br>
      because a replace/delete causes initiating on both ends now.
      <br>
      <br>
      Clearly we need some kind of back-off method for some of this.
      Avoiding
      <br>
      interop issues is a little more tricky.
      <br>
      <br>
      And then its more confusing if you think about rekey. With
      auto=add
      <br>
      and the connection --up'ed and rekey=no, if we deem that the same
      as
      <br>
      auto=start, then what do we do at the end of the keylife. We used
      to
      <br>
      let the connection die because rekey=no, but then now the delete
      causes
      <br>
      a new initiate to happen, in effect causing the same effect as
      rekey=yes
      <br>
      <br>
      If anyone has any smart ideas, please let me know :)
      <br>
      <br>
      Paul
      <br>
    </blockquote>
    <br>
  </body>
</html>