]> git.ipfire.org Git - thirdparty/openwrt.git/commit
base-files: use cidr for config_generate 13780/head
authorVladislav Grigoryev <vg.aetera@gmail.com>
Tue, 24 Oct 2023 17:33:09 +0000 (20:33 +0300)
committerRobert Marko <robimarko@gmail.com>
Fri, 30 May 2025 20:55:27 +0000 (22:55 +0200)
commitd989d9a8ec4c94bd2185cac45ad9f3272ce100ac
tree3b058b61e78c95f16f68762d746f012b7b2a57a5
parent427c4aa266169b67aa26c0817b807d2921b4bba5
base-files: use cidr for config_generate

Generate network configuration replacing netmask with CIDR.

Depends on:
https://github.com/openwrt/openwrt/pull/13765

Using CIDR provides the following advantages:
* Consolidate notation for IPv4 and IPv6 addresses.
* Consolidate notation for IP addresses and routing targets.
* Simplify network configuration and troubleshooting.
* Follow the transition from net-tools to iproute2.

Resulting configuration example:
```
config interface 'loopback'
option device 'lo'
option proto 'static'
list ipaddr '127.0.0.1/8'

config interface 'lan'
option device 'br-lan'
option proto 'static'
list ipaddr '192.168.1.1/24'
```

Signed-off-by: Vladislav Grigoryev <vg.aetera@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/13780
Signed-off-by: Robert Marko <robimarko@gmail.com>
package/base-files/files/bin/config_generate