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] [day] [month] [year] [list]
Message-Id: <20200704.175246.123858644791564054.davem@davemloft.net>
Date:   Sat, 04 Jul 2020 17:52:46 -0700 (PDT)
From:   David Miller <davem@...emloft.net>
To:     xie.he.0141@...il.com
Cc:     kuba@...nel.org, madhuparnabhowmik04@...il.com,
        netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        linux-x25@...r.kernel.org
Subject: Re: [PATCH] drivers/net/wan/lapbether: Fixed the value of
 hard_header_len

From: Xie He <xie.he.0141@...il.com>
Date: Fri,  3 Jul 2020 22:12:46 -0700

> When transmitting data from upper layers or from AF_PACKET sockets,
>   this driver will first remove a pseudo header of 1 byte,
>   then the lapb module will prepend the LAPB header of 2 or 3 bytes,
>   then this driver will prepend a length field of 2 bytes,
>   then the underlying Ethernet device will prepend its own header.

Please add something like this above text to a comment:

> @@ -324,6 +323,8 @@ static int lapbeth_new_device(struct net_device *dev)
>  	if (!ndev)
>  		goto out;
>  
> +	ndev->hard_header_len = -1 + 3 + 2 + dev->hard_header_len;
> +

Above this new line so that someone reading the code can understand
these magic numbers and what they mean.

Thank you.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ