<div dir="auto"><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Oct 6, 2017 19:56, "Amish" <<a href="mailto:anon.amish@gmail.com">anon.amish@gmail.com</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF"><div class="quoted-text">
    <p><br>
    </p>
    <br>
    <div class="m_9115508211055876889moz-cite-prefix">On Friday 06 October 2017 07:36 PM,
      Susant Sahani wrote:<br>
    </div>
    <blockquote type="cite">
      <div dir="auto">
        <div dir="ltr">
          <div class="gmail_extra"><br>
            <div class="gmail_quote">On Fri, Oct 6, 2017 at 3:03 PM,
              Amish <span dir="ltr"><<a href="mailto:anon.amish@gmail.com" target="_blank">anon.amish@gmail.com</a>></span>
              wrote:<br>
              <blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
                <br>
                Thank you. I am curious to know if this new setting:<br>
                ConfigureWithoutCarrier=1 would resolve my query few
                months back.<br>
                (Although I would not be able to try it out yet for 2-3
                weeks)<br>
                <br>
                Subject: Persistent address on "Lost carrier"<br>
                Link: <a href="https://lists.freedesktop.org/archives/systemd-devel/2017-June/039041.html" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>archives/systemd-devel/2017-Ju<wbr>ne/039041.html</a><br>
                <br>
                i.e. systemd-networkd should not remove IP address and
                routes on "Lost carrier".<br>
                <br>
                I looked at the code here:<br>
                <a href="https://github.com/systemd/systemd/blob/master/src/network/networkd-link.c" rel="noreferrer" target="_blank">https://github.com/systemd/sys<wbr>temd/blob/master/src/network/n<wbr>etworkd-link.c</a><br>
                <br>
                It appears that - it is still not so.<br>
                <br>
                i.e. If carrier is lost (eg. cable removed / network
                issues) then<br>
                link_update() function would go ahead and call
                link_carrier_lost()<br>
                and unconfigure the device.<br>
                <br>
                i.e. it will not obey ConfigureWithoutCarrier=1 which I
                believe it should.<br>
              </blockquote>
              <div><br>
              </div>
              <div>No that is not intended use case for
                 ConfigureWithoutCarrier=. It will only look during
                configuring the the link.</div>
              <div> While configuring a link even if that link has no
                carrier it will go on set it as configured for example
                empty bridges.<br>
              </div>
              <div><a href="https://github.com/systemd/systemd/issues/6645" target="_blank">https://github.com/systemd/sys<wbr>temd/issues/6645</a>.
                But in your case It is already configured via gained
                carrier not via </div>
              <div>ConfigureWithoutCarrier even if you set it to true.</div>
              <div><br>
              </div>
              <div><br>
              </div>
            </div>
          </div>
        </div>
      </div>
    </blockquote>
    <br></div>
    My issue is on similar lines too. May be extension to it.<br>
    <br>
    i.e. if ConfigureWithoutCarrier is set then it should not
    Un-configure when carrier is lost.</div></blockquote></div></div></div><div dir="auto">How it will loose the carrier first place if it never intended to gain carrier. That means it's a totall different use case. Don't drop config if carrier is lost. For that you need to open a rfe request. </div><div dir="auto"></div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    <br>
    The problem I face is that I have some IPs via certain "secure"
    interface. (set via [Route])<br>
    <br>
    But if carrier is lost for a while for any reason then IP address as
    well as routes get deleted.<br>
    <br>
    When routes get deleted then packets to those IPs start going via
    "default" route which becomes security risk.<br>
    <br>
    I can workaround this via firewall.<br>
    <br>
    But it would be great if ConfigureWithoutCarrier is checked for
    carrier_lost case too and IP is not un-configured.<br></div></blockquote></div></div></div><div dir="auto">PreserveConfigIfCarrierLost would be more appropriate. Both a different use case. I don't think we should mixup. </div><div dir="auto"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
    Thanks and regards,<br>
    <br>
    Amish.<br>
  </div>

<br>______________________________<wbr>_________________<br>
systemd-devel mailing list<br>
<a href="mailto:systemd-devel@lists.freedesktop.org">systemd-devel@lists.<wbr>freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/systemd-devel" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/systemd-devel</a><br>
<br></blockquote></div><br></div></div></div>