Re: IP4Config and routes

On Wed, 2009-12-16 at 18:23 +0000, Daniel Drake wrote:
> On Wed, 2009-12-16 at 17:53 +0000, Daniel Drake wrote:
> > Thanks! Very comprehensive.
> > 
> > Is this part correct?
> > 
> > "Routes cannot be used with the 'shared' or 'link-local' methods as
> > there is no upstream network."
> > 
> > We're using link-local. Might explain my troubles, but in this case we
> > need a route even though we aren't dealing with an upstream network.
> Well, if it is correct, we aren't even hitting the bit of the code where
> it is enforced. (or at least I haven't spotted it)

Yes, it's correct in these cases because for shared, NM is handling the
network and there's no routing out of it since the network is NAT-ed to
the main connection.  In link-local it's not relevant since the
link-local is by definition /not routable/...

> I have traced the code and I am finding :
> - nm_setting_new_from_hash() is being called 
> - it is calling parse_one_setting()
> - which then calls nm_setting_new_from_hash()
> - the hash table has 2 properties inside(method,routes)
> - one_property_cb() is called on both those properties and is successful
> at adding them to the list
> - back in nm_setting_new_from_hash(), g_object_newv() is called with the
> property list (method and routes)
> - a NMSettingIP4Config is constructed, and these properties are set:
>  6(ignore auto routes), 7(ignore auto dns), 10(never default), 1(method)
> Why is set_property not called for the routes property?
> Is it because routes is a _nm_param_spec_specialized? (I'm not exactly
> sure what the difference is between this and the regular glib param
> specs)

I'm more inclined to think that the bits aren't getting passed by to NM
correctly; are you sure you're passing the item with a dbus signature of
'aau'?  The code that actually unpacks the routes property is
nm_utils_ip4_routes_from_gvalue() in nm-utils.c.  Trace into
nm-setting-ip4-config.c's set_property() call and see if the PROP_ROUTES
case is run.


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