]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile: lxc.net.ipv4 --> lxc.net.ipv4.address
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 2 Jul 2017 09:53:34 +0000 (11:53 +0200)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 2 Jul 2017 12:40:06 +0000 (14:40 +0200)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
12 files changed:
doc/examples/lxc-complex.conf.in
doc/examples/lxc-macvlan.conf.in
doc/examples/lxc-phys.conf.in
doc/examples/lxc-veth.conf.in
doc/examples/lxc-vlan.conf.in
doc/lxc.container.conf
doc/lxc.container.conf.sgml.in
src/lxc/confile.c
src/tests/parse_config_file.c
templates/lxc-altlinux.in
templates/lxc-openmandriva.in
templates/lxc-sshd.in

index 3ae5112d9eb02ad0971c1aabeec18389e55901c2..f78e66f063e5acb43f82775141b804fa2e200229 100644 (file)
@@ -5,19 +5,19 @@ lxc.net.0.type = veth
 lxc.net.0.flags = up
 lxc.net.0.link = br0
 lxc.net.0.hwaddr = 4a:49:43:49:79:bf
-lxc.net.0.ipv4 = 10.2.3.5/24
+lxc.net.0.ipv4.address = 10.2.3.5/24
 lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
 
 lxc.net.0.type = macvlan
 lxc.net.0.flags = up
 lxc.net.0.link = eth0
 lxc.net.0.hwaddr = 4a:49:43:49:79:bd
-lxc.net.0.ipv4 = 10.2.3.4/24
+lxc.net.0.ipv4.address = 10.2.3.4/24
 lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
 
 lxc.net.0.type = phys
 lxc.net.0.flags = up
 lxc.net.0.link = dummy0
 lxc.net.0.hwaddr = 4a:49:43:49:79:ff
-lxc.net.0.ipv4 = 10.2.3.6/24
+lxc.net.0.ipv4.address = 10.2.3.6/24
 lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297
index 8fc2be9445eb8d0612e9764edbde3d1178a6369d..2c78cba4d0251ad7fdbf0979a108062c939d8108 100644 (file)
@@ -4,5 +4,5 @@ lxc.net.0.type = macvlan
 lxc.net.0.flags = up
 lxc.net.0.link = eth0
 lxc.net.0.hwaddr = 4a:49:43:49:79:bd
-lxc.net.0.ipv4 = 10.2.3.4/24
+lxc.net.0.ipv4.address = 10.2.3.4/24
 lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
index a92ae986bdb0099102db078390713efca3298df7..73b977b625d6a9b6f86caa613fc8208b98c61c72 100644 (file)
@@ -5,5 +5,5 @@ lxc.net.0.type = phys
 lxc.net.0.flags = up
 lxc.net.0.link = eth0
 lxc.net.0.hwaddr = 4a:49:43:49:79:ff
-lxc.net.0.ipv4 = 10.2.3.6/24
+lxc.net.0.ipv4.address = 10.2.3.6/24
 lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297
index 83def3a9e12aedffe85444565cf90a12b7cd577e..d4fdb9020c07471d6011a13429322fdd7cf6f843 100644 (file)
@@ -5,5 +5,5 @@ lxc.net.0.type = veth
 lxc.net.0.flags = up
 lxc.net.0.link = br0
 lxc.net.0.hwaddr = 4a:49:43:49:79:bf
-lxc.net.0.ipv4 = 10.2.3.5/24
+lxc.net.0.ipv4.address = 10.2.3.5/24
 lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
index 057920c2e54444b0a99ff37e777d5c1cd1fff657..2d900f8c290ea77ece6dffda971b36e1c1aab2a7 100644 (file)
@@ -5,5 +5,5 @@ lxc.net.0.vlan.id = 1234
 lxc.net.0.flags = up
 lxc.net.0.link = eth0
 lxc.net.0.hwaddr = 4a:49:43:49:79:bd
-lxc.net.0.ipv4 = 10.2.3.4/24
+lxc.net.0.ipv4.address = 10.2.3.4/24
 lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
index 8606f9ebc82426229355d30e9be93f7a5c6fafc7..174df79491c7c626a8c66819140ac0396260153f 100644 (file)
@@ -28,7 +28,7 @@ lxc.net.0.hwaddr = 4a:49:43:49:79:bd
 
 # specify the ipv4 address of the container. Several lines are allowed and
 # will mean several addresses will be assigned to the interface
-lxc.net.0.ipv4 = 1.2.3.5/24
+lxc.net.0.ipv4.address = 1.2.3.5/24
 
 # specify the ipv6 address of the container. Several lines are allowed and
 # will mean several addresses will be assigned to the interface
index 73fa12f552fee56ba4106c0245aeaa48eb364d28..0771703898b83472f5ed1cc603e11023dc183a9e 100644 (file)
@@ -523,7 +523,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
         <varlistentry>
           <term>
-            <option>lxc.net.[i].ipv4</option>
+            <option>lxc.net.[i].ipv4.address</option>
           </term>
           <listitem>
             <para>
@@ -1924,7 +1924,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
         lxc.net.0.link = br0
         lxc.net.0.name = eth0
         lxc.net.0.hwaddr = 4a:49:43:49:79:bf
-        lxc.net.0.ipv4 = 10.2.3.5/24 10.2.3.255
+        lxc.net.0.ipv4.address = 10.2.3.5/24 10.2.3.255
         lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
       </programlisting>
     </refsect2>
@@ -1966,21 +1966,21 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
         lxc.net.0.flags = up
         lxc.net.0.link = br0
         lxc.net.0.hwaddr = 4a:49:43:49:79:bf
-        lxc.net.0.ipv4 = 10.2.3.5/24 10.2.3.255
+        lxc.net.0.ipv4.address = 10.2.3.5/24 10.2.3.255
         lxc.net.0.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
         lxc.net.0.ipv6 = 2003:db8:1:0:214:5432:feab:3588
         lxc.net.1.type = macvlan
         lxc.net.1.flags = up
         lxc.net.1.link = eth0
         lxc.net.1.hwaddr = 4a:49:43:49:79:bd
-        lxc.net.1.ipv4 = 10.2.3.4/24
-        lxc.net.1.ipv4 = 192.168.10.125/24
+        lxc.net.1.ipv4.address = 10.2.3.4/24
+        lxc.net.1.ipv4.address = 192.168.10.125/24
         lxc.net.1.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
         lxc.net.2.type = phys
         lxc.net.2.flags = up
         lxc.net.2.link = dummy0
         lxc.net.2.hwaddr = 4a:49:43:49:79:ff
-        lxc.net.2.ipv4 = 10.2.3.6/24
+        lxc.net.2.ipv4.address = 10.2.3.6/24
         lxc.net.2.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297
         lxc.cgroup.cpuset.cpus = 0,1
         lxc.cgroup.cpu.shares = 1234
index ed13a345d10e091be52c0deccc152185abbb9732..9f322f8d3ad2cdfb20a95d1aed4a1392789fbeac 100644 (file)
@@ -103,7 +103,7 @@ lxc_config_define(net_macvlan_mode);
 lxc_config_define(net_hwaddr);
 lxc_config_define(net_vlan_id);
 lxc_config_define(net_mtu);
-lxc_config_define(net_ipv4);
+lxc_config_define(net_ipv4_address);
 lxc_config_define(net_ipv4_gateway);
 lxc_config_define(net_script_up);
 lxc_config_define(net_script_down);
@@ -229,7 +229,7 @@ static struct lxc_config_t config[] = {
        { "lxc.net.mtu",                   set_config_net_mtu,                     get_config_net_mtu,                     clr_config_net_mtu,                   },
        { "lxc.net.vlan.id",               set_config_net_vlan_id,                 get_config_net_vlan_id,                 clr_config_net_vlan_id,               },
        { "lxc.net.ipv4.gateway",          set_config_net_ipv4_gateway,            get_config_net_ipv4_gateway,            clr_config_net_ipv4_gateway,          },
-       { "lxc.net.ipv4",                  set_config_net_ipv4,                    get_config_net_ipv4,                    clr_config_net_ipv4,                  },
+       { "lxc.net.ipv4.address",          set_config_net_ipv4_address,            get_config_net_ipv4_address,            clr_config_net_ipv4_address,          },
        { "lxc.net.ipv6.gateway",          set_config_net_ipv6_gateway,            get_config_net_ipv6_gateway,            clr_config_net_ipv6_gateway,          },
        { "lxc.net.ipv6",                  set_config_net_ipv6,                    get_config_net_ipv6,                    clr_config_net_ipv6,                  },
        { "lxc.net.",                      set_config_net_nic,                     get_config_net_nic,                     clr_config_net_nic,                   },
@@ -521,7 +521,7 @@ extern int lxc_list_nicconfigs(struct lxc_conf *c, const char *key, char *retv,
                strprint(retv, inlen, "mtu\n");
                strprint(retv, inlen, "ipv6\n");
                strprint(retv, inlen, "ipv6.gateway\n");
-               strprint(retv, inlen, "ipv4\n");
+               strprint(retv, inlen, "ipv4.address\n");
                strprint(retv, inlen, "ipv4.gateway\n");
        }
 
@@ -756,8 +756,8 @@ static int set_config_net_mtu(const char *key, const char *value,
        return set_config_string_item(&netdev->mtu, value);
 }
 
-static int set_config_net_ipv4(const char *key, const char *value,
-                              struct lxc_conf *lxc_conf, void *data)
+static int set_config_net_ipv4_address(const char *key, const char *value,
+                                      struct lxc_conf *lxc_conf, void *data)
 {
        struct lxc_netdev *netdev;
        struct lxc_inetdev *inetdev;
@@ -766,7 +766,7 @@ static int set_config_net_ipv4(const char *key, const char *value,
        char *addr = NULL, *bcast = NULL, *prefix = NULL;
 
        if (lxc_config_value_empty(value))
-               return clr_config_net_ipv4(key, lxc_conf, data);
+               return clr_config_net_ipv4_address(key, lxc_conf, data);
 
        if (!data)
                return -1;
@@ -4019,8 +4019,8 @@ static int clr_config_net_ipv4_gateway(const char *key,
        return 0;
 }
 
-static int clr_config_net_ipv4(const char *key, struct lxc_conf *lxc_conf,
-                              void *data)
+static int clr_config_net_ipv4_address(const char *key,
+                                      struct lxc_conf *lxc_conf, void *data)
 {
        struct lxc_netdev *netdev;
        struct lxc_list *cur, *next;
@@ -4418,8 +4418,8 @@ static int get_config_net_ipv4_gateway(const char *key, char *retv, int inlen,
        return fulllen;
 }
 
-static int get_config_net_ipv4(const char *key, char *retv, int inlen,
-                              struct lxc_conf *c, void *data)
+static int get_config_net_ipv4_address(const char *key, char *retv, int inlen,
+                                      struct lxc_conf *c, void *data)
 {
        int len, fulllen = 0;
        size_t listlen;
index 118755900e61886e2158bb7e9f66a7b2819d1349..bffff0e797c3a0b731ca380cb8d038a034ceeab7 100644 (file)
@@ -95,13 +95,13 @@ static int set_and_clear_complete_netdev(struct lxc_container *c)
                return -1;
        }
 
-       if (!c->set_config_item(c, "lxc.net.1.ipv4", "10.0.2.3/24")) {
-               lxc_error("%s\n", "lxc.net.1.ipv4");
+       if (!c->set_config_item(c, "lxc.net.1.ipv4.address", "10.0.2.3/24")) {
+               lxc_error("%s\n", "lxc.net.1.ipv4.address");
                return -1;
        }
 
-       if (!c->set_config_item(c, "lxc.net.1.ipv4_gateway", "10.0.2.2")) {
-               lxc_error("%s\n", "lxc.net.1.ipv4");
+       if (!c->set_config_item(c, "lxc.net.1.ipv4.gateway", "10.0.2.2")) {
+               lxc_error("%s\n", "lxc.net.1.ipv4.gateway");
                return -1;
        }
 
@@ -985,9 +985,9 @@ int main(int argc, char *argv[])
                goto non_test_error;
        }
 
-       if (set_get_compare_clear_save_load(c, "lxc.net.0.ipv4",
+       if (set_get_compare_clear_save_load(c, "lxc.net.0.ipv4.address",
                                            "10.0.2.3/24", tmpf, true)) {
-               lxc_error("%s\n", "lxc.net.0.ipv4");
+               lxc_error("%s\n", "lxc.net.0.ipv4.address");
                goto non_test_error;
        }
 
index fe57f326202c14f1ad486188391b446f8133877d..a0d1d5468f647cc1db8b7e7a231095cf92f69b0b 100644 (file)
@@ -293,7 +293,7 @@ lxc.cap.drop = sys_module mac_admin mac_override sys_time
 EOF
 if [ ! -z ${ipv4} ]; then
     cat <<EOF >> $config_path/config
-lxc.net.0.ipv4 = $ipv4
+lxc.net.0.ipv4.address = $ipv4
 EOF
 fi
 if [ ! -z ${gw} ]; then
index 8845e617e47685a57d95140e923290d0c412003e..bf536b7b3c912848791091e731d4ec1b832c7de3 100644 (file)
@@ -246,7 +246,7 @@ lxc.net.0.mtu = 1500
 EOF
 if [ ! -z ${ipv4} ]; then
     cat <<EOF >> $config_path/config
-lxc.net.0.ipv4 = $ipv4
+lxc.net.0.ipv4.address = $ipv4
 EOF
 fi
 if [ ! -z ${gw} ]; then
index 8cf4d6ae7471a2f24c9b99e4707ea4fc1312917e..14c03270ad751af2ad3a0ed8b983874a45c92904 100644 (file)
@@ -162,7 +162,7 @@ EOF
     fi
 
     # if no .ipv4 section in config, then have the container run dhcp
-    grep -q "^lxc.net.0.ipv4" $path/config || touch $rootfs/run-dhcp
+    grep -q "^lxc.net.0.ipv4.address" $path/config || touch $rootfs/run-dhcp
 
     if [ "$(uname -m)" = "x86_64" ]; then
         cat <<EOF >> $path/config