Re: [patch] check for a gateway of zero.



On Fri, 2005-07-01 at 15:37 -0400, Robert Love wrote:
> Hi Ho!
> 
> "nm_system_device_set_ip4_route_with_iface()" will fail if "ip4_gateway"
> is zero.  Zero is not a legal gateway and the ioctl will return EINVAL.
> 
> The problem is, the zeroconf IP stuff (and possibly other places) set
> the gateway to zero to mean "no gateway".  But
> "nm_system_device_set_from_ip4_config()" and other places sets the
> gateway to the value in NMIP4Config.
> 
> Attached patch checks for and simply returns if "ip4_gateway" is zero.
> This is fine--indeed, the expecting behavior.  We just need to make sure
> we flush the routes first (we do).
> 
> Without this, autoip causes an error on assignment.
> 
> Alternative fixes would check for zero at a different level, but we
> might as well do it where it matters.
> 
> May I apply?

Sure.

Dan




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