On Friday 06 October 2017 07:36 PM, Susant Sahani wrote:

On Fri, Oct 6, 2017 at 3:03 PM, Amish <[email protected] <mailto:[email protected]>> wrote:

    Hello,

    Thank you. I am curious to know if this new setting:
    ConfigureWithoutCarrier=1 would resolve my query few months back.
    (Although I would not be able to try it out yet for 2-3 weeks)

    Subject: Persistent address on "Lost carrier"
    Link:
    https://lists.freedesktop.org/archives/systemd-devel/2017-June/039041.html
    <https://lists.freedesktop.org/archives/systemd-devel/2017-June/039041.html>

    i.e. systemd-networkd should not remove IP address and routes on
    "Lost carrier".

    I looked at the code here:
    https://github.com/systemd/systemd/blob/master/src/network/networkd-link.c
    <https://github.com/systemd/systemd/blob/master/src/network/networkd-link.c>

    It appears that - it is still not so.

    i.e. If carrier is lost (eg. cable removed / network issues) then
    link_update() function would go ahead and call link_carrier_lost()
    and unconfigure the device.

    i.e. it will not obey ConfigureWithoutCarrier=1 which I believe it
    should.


No that is not intended use case for  ConfigureWithoutCarrier=. It will only look during configuring the the link.  While configuring a link even if that link has no carrier it will go on set it as configured for example empty bridges. https://github.com/systemd/systemd/issues/6645 <https://github.com/systemd/systemd/issues/6645>. But in your case It is already configured via gained carrier not via
ConfigureWithoutCarrier even if you set it to true.



My issue is on similar lines too. May be extension to it.

i.e. if ConfigureWithoutCarrier is set then it should not Un-configure when carrier is lost.

The problem I face is that I have some IPs via certain "secure" interface. (set via [Route])

But if carrier is lost for a while for any reason then IP address as well as routes get deleted.

When routes get deleted then packets to those IPs start going via "default" route which becomes security risk.

I can workaround this via firewall.

But it would be great if ConfigureWithoutCarrier is checked for carrier_lost case too and IP is not un-configured.

Thanks and regards,

Amish.
_______________________________________________
systemd-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to