Re: [netcf-devel] [PATCH 2/2] Remove all config-origined info from ncf_if_xml_state output.

2009-10-07 Thread David Lutterkort
On Wed, 2009-10-07 at 15:42 -0400, Laine Stump wrote: > I actually removed that initialization as a pre-emptive move against Jim > ever running clang on netcf - ncf_xml is guaranteed to be initialized in > every code path, so the initialization in the definition will (from what > I understood of

Re: [netcf-devel] [PATCH 2/2] Remove all config-origined info from ncf_if_xml_state output.

2009-10-07 Thread Laine Stump
On 10/07/2009 02:28 PM, David Lutterkort wrote: > On Wed, 2009-10-07 at 09:50 -0400, Laine Stump wrote: > >> Modify ncf_if_xml_state() to return *only* information queried from >> the running device/kernel. Because this makes the "source='device'" >> attribute redundant, also remove that. >> >>

Re: [netcf-devel] [PATCH 1/2] Don't attempt SIOCGIFADDR/NETMASK on downed interfaces.

2009-10-07 Thread Laine Stump
On 10/07/2009 02:25 PM, David Lutterkort wrote: > On Wed, 2009-10-07 at 09:50 -0400, Laine Stump wrote: > >> Both of these ioctls return an error if the interface is down. >> > Looks good. There were a few minor nits that I fixed up before > committing: > > >> --- >> src/dutil.c |

Re: [netcf-devel] [PATCH 2/2] Remove all config-origined info from ncf_if_xml_state output.

2009-10-07 Thread David Lutterkort
On Wed, 2009-10-07 at 09:50 -0400, Laine Stump wrote: > Modify ncf_if_xml_state() to return *only* information queried from > the running device/kernel. Because this makes the "source='device'" > attribute redundant, also remove that. > > Currently, we only query for the ipv4 address of the interf

Re: [netcf-devel] [PATCH 1/2] Don't attempt SIOCGIFADDR/NETMASK on downed interfaces.

2009-10-07 Thread David Lutterkort
On Wed, 2009-10-07 at 09:50 -0400, Laine Stump wrote: > Both of these ioctls return an error if the interface is down. Looks good. There were a few minor nits that I fixed up before committing: > --- > src/dutil.c | 20 ++-- > 1 files changed, 18 insertions(+), 2 deletions(-) >

Re: [netcf-devel] feature request: control host-wide configuration

2009-10-07 Thread David Lutterkort
On Wed, 2009-10-07 at 00:14 +0200, Dan Kenigsberg wrote: > I've been bitten by letting users set GATEWAY per interface. > It may sometimes be useful, but it mostly opens the door for a lot of > mess, as only one "random" GATEWAY gets used. > > What I should have really done is let users control th

[netcf-devel] [PATCH 2/2] Remove all config-origined info from ncf_if_xml_state output.

2009-10-07 Thread Laine Stump
Modify ncf_if_xml_state() to return *only* information queried from the running device/kernel. Because this makes the "source='device'" attribute redundant, also remove that. Currently, we only query for the ipv4 address of the interface; if there is none, don't even add a protocol node to the tre

[netcf-devel] [PATCH 1/2] Don't attempt SIOCGIFADDR/NETMASK on downed interfaces.

2009-10-07 Thread Laine Stump
Both of these ioctls return an error if the interface is down. Also, lack of an IPv4 address/netmask should not be considered an error. --- src/dutil.c | 20 ++-- 1 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/dutil.c b/src/dutil.c index a7dbbcf..6b9d279 100

[netcf-devel] [PATCH 0/2] simpler ncf_if_xml_state

2009-10-07 Thread Laine Stump
This is the result of discussion yesterday on libvirt list about whether ncf_if_xml_state should return live + config data and add an extra attribute to the live data, or return *only* live data. It looks like we can all agree on the scheme of returning only live data, so here's a patch that imple