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: <YtbPtkF1Ah9xrBam@lunn.ch>
Date:   Tue, 19 Jul 2022 17:37:26 +0200
From:   Andrew Lunn <andrew@...n.ch>
To:     Antonio Quartulli <antonio@...nvpn.net>
Cc:     netdev@...r.kernel.org, David Miller <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, linux-kernel@...r.kernel.org
Subject: Re: [RFC 1/1] net: introduce OpenVPN Data Channel Offload (ovpn-dco)

> +static int ovpn_net_change_mtu(struct net_device *dev, int new_mtu)
> +{
> +	if (new_mtu < IPV4_MIN_MTU ||
> +	    new_mtu + dev->hard_header_len > IP_MAX_MTU)
> +		return -EINVAL;

If you set dev->min_mtu and dev->max_mtu, the core will validate this
for you, see dev_validate_mtu().

> +static int ovpn_get_link_ksettings(struct net_device *dev,
> +				   struct ethtool_link_ksettings *cmd)
> +{
> +	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.supported, 0);
> +	ethtool_convert_legacy_u32_to_link_mode(cmd->link_modes.advertising, 0);

These two should not be needed. Look at tun, veth etc, they don't set
them.

	Andrew

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ