Subject: Re: [PATCH 1/1 net-2.6] Re-enable IP when MTU > 68

From: Ben Hutchings <[email-masked]>
Date: Fri, 29 Aug 2008 16:05:08 +0100

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.