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]
Date:	Fri, 29 Aug 2008 16:05:08 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	Breno Leitao <leitao@...ux.vnet.ibm.com>
Cc:	David Miller <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>, Lorandi <rafaello@...ibm.com>
Subject: Re: [PATCH 1/1 net-2.6] Re-enable IP when MTU > 68

Breno Leitao wrote:
[...]
> diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
> index 91d3d96..758b4f6 100644
> --- a/net/ipv4/devinet.c
> +++ b/net/ipv4/devinet.c
> @@ -1048,6 +1048,10 @@ static int inetdev_event(struct notifier_block *this, unsigned long event,
>  				IN_DEV_CONF_SET(in_dev, NOXFRM, 1);
>  				IN_DEV_CONF_SET(in_dev, NOPOLICY, 1);
>  			}
> +		} else if (event == NETDEV_CHANGEMTU) {
> +			/* Re-enabling IP */
> +			if (dev->mtu > 68)
[...]

Should be >= to match the other tests.  And it would really be cleaner to
use something like

	static inline bool inetdev_valid_mtu(unsigned mtu)
	{
		return mtu >= 68;
	}

rather than repeating the magic number.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ