bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] pfinet: configure_dev does not initialize the ifa correctly


From: Marcus Brinkmann
Subject: Re: [PATCH] pfinet: configure_dev does not initialize the ifa correctly
Date: Wed, 18 Jul 2001 19:04:02 +0200
User-agent: Mutt/1.3.18i

On Wed, Jul 18, 2001 at 04:17:06PM +0200, Neal H Walfield wrote:
> configure_device does not initialize the ifa correctly.  It sets it to
> zero and INADDR_NONE != 0.

Ok, I can fix this in.

>       * linux-src/net/ipv4/devinit.c (configure_device):  If we are
>       setting the peer on an IFF_POINTOPOINT link, we must force the
>       metmask to 255.255.255.255.

> @@ -435,7 +440,7 @@ configure_device (struct device *dev,
>    if (peer != INADDR_NONE && (dev->flags & IFF_POINTOPOINT))
>      {
>        ifa->ifa_prefixlen = 32;
> -      if (netmask != INADDR_NONE)
> +      if (netmask != INADDR_NONE && !(dev->flags & IFF_POINTOPOINT))
>       ifa->ifa_mask = netmask;
>        else
>       ifa->ifa_mask = inet_make_mask(32);

I don't understand this part of the patch. Note that the way you changed it,
the if condition can never evaluate to true.  The upper if condition already
guarantees that the IFF_POINTOPOINT flag is set.

Can you redo the patch?  Also metmask -> netmask in the ChangeLog, or you
make Roland unhappy ;)  I wait with the initialization fix til then.

Thanks,
Marcus

-- 
`Rhubarb is no Egyptian god.' Debian http://www.debian.org brinkmd@debian.org
Marcus Brinkmann              GNU    http://www.gnu.org    marcus@gnu.org
Marcus.Brinkmann@ruhr-uni-bochum.de
http://www.marcus-brinkmann.de



reply via email to

[Prev in Thread] Current Thread [Next in Thread]