lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJht_ENE5fGr-rgOd-5Tk_g5RJibaWBn_ey5Avo-2R2opMGcDA@mail.gmail.com>
Date:   Tue, 17 Nov 2020 03:41:24 -0800
From:   Xie He <xie.he.0141@...il.com>
To:     Martin Schiller <ms@....tdt.de>
Cc:     Andrew Hendry <andrew.hendry@...il.com>,
        "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>,
        Linux X25 <linux-x25@...r.kernel.org>,
        Linux Kernel Network Developers <netdev@...r.kernel.org>,
        LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next v2 4/6] net/x25: support NETDEV_CHANGE notifier

On Mon, Nov 16, 2020 at 6:00 AM Martin Schiller <ms@....tdt.de> wrote:
>
> This makes it possible to handle carrier lost and detection.
> In case of carrier lost, we shutdown layer 3 and flush all sessions.
>
> @@ -275,6 +275,19 @@ static int x25_device_event(struct notifier_block *this, unsigned long event,
>                                  dev->name);
>                         x25_link_device_remove(dev);
>                         break;
> +               case NETDEV_CHANGE:
> +                       pr_debug("X.25: got event NETDEV_CHANGE for device: %s\n",
> +                                dev->name);
> +                       if (!netif_carrier_ok(dev)) {
> +                               pr_debug("X.25: Carrier lost -> set link state down: %s\n",
> +                                        dev->name);
> +                               nb = x25_get_neigh(dev);
> +                               if (nb) {
> +                                       x25_link_terminated(nb);
> +                                       x25_neigh_put(nb);
> +                               }
> +                       }
> +                       break;
>                 }
>         }

I think L2 will notify L3 if the L2 connection is terminated. Is this
patch necessary?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ