[PATCH 0/4] VLAN support for NetworkManager(V5)

This patchset is to add vlan support for NetworkManager,
based on nm upstream, 
commit bed4d1533970(cli: use nm_utils_hwaddr_ntoa() from libnm-util).

Requires libnl-3.2.1

1 example of vlan ifcfg file
We try to make it compitable with the format used by initscripts,
and there is no need to change anything for ifcfg-eth9.

DEVICE=vlan43 or DEVICE=eth9.43

2 create and delete vlan device
We use libnl to create and delete vlan device in kernel.

3 support both static IP configuration and DHCP for vlan device

1 accept MAC address or NM connection UUID as PHYSDEV

2 activating dependency
Before activating a vlan device, we should make sure that the underlying
physical ethernet device is up.
For example, before activating eth0.100, we should make sure that eth0 is up.
NetworkManager calls g_udev_client_query_by_subsystem() to get the device
list, and then activates each devices on that device list.
And luckily I found that the physical ethernet device is prior to vlan device
on that device list, so there is nothing to do to make sure the activating
sequence between a vlan device and its underlying physical ethernet device.

Maybe we should not rely on the behavior of
g_udev_client_query_by_subsystem(), and we should add special restriction to
make sure that before activating a vlan device, the underlying physical 
ethernet device is up.

1 rebase on nm upstream, 
commit bed4d1533970(cli: use nm_utils_hwaddr_ntoa() from libnm-util).

1 rebase on nm upstream, and [PATCH 0/7] bonding updates rebased,
from Thomas Graf(tgraf redhat com).
2 use nm_connection_get_virtual_iface_name()

1 parse format "DEVICE=eth9.43"
2 modify NMSettingVlan->get_property()
3 call nm_system_add_vlan_device() to create vlan device in kernel

1 rebase on nm/bonding branch
2 use "vlan" or "Vlan" instead of "VLAN" for consistency.
3 use GSList to store vlan ingress/egress priority map.
4 add enum NMVlanFlags.
5 delete NMDeviceVLAN, just use NMDeviceEthernet.
6 add ifcfg-vlan writer

Weiping Pan (4):
  vlan: add ifcfg-vlan parser
  vlan: create/delete kernel vlan device
  vlan: create NMDeviceEthernet for vlan device
  vlan: add ifcfg-vlan writer

 libnm-util/Makefile.am                             |    2 +
 libnm-util/libnm-util.ver                          |   12 +
 libnm-util/nm-connection.c                         |   26 +-
 libnm-util/nm-connection.h                         |    2 +
 libnm-util/nm-setting-vlan.c                       |  652 ++++++++++++++++++++
 libnm-util/nm-setting-vlan.h                       |  118 ++++
 src/nm-device-ethernet.c                           |    3 +
 src/nm-device-ethernet.h                           |    2 -
 src/nm-manager.c                                   |   11 +
 src/nm-system.c                                    |  152 +++++
 src/nm-system.h                                    |    4 +
 src/nm-udev-manager.c                              |    5 +-
 src/settings/plugins/ifcfg-rh/common.h             |    1 +
 src/settings/plugins/ifcfg-rh/reader.c             |  175 +++++-
 .../network-scripts/ifcfg-test-vlan-interface      |   11 +-
 .../plugins/ifcfg-rh/tests/test-ifcfg-rh.c         |   41 ++-
 src/settings/plugins/ifcfg-rh/writer.c             |   84 +++
 17 files changed, 1278 insertions(+), 23 deletions(-)
 create mode 100644 libnm-util/nm-setting-vlan.c
 create mode 100644 libnm-util/nm-setting-vlan.h


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