Skip to content

Commit a307562

Browse files
authored
Merge branch 'vyos:current' into feature/dhcpv4-ddns
2 parents a9adfc5 + 4221687 commit a307562

25 files changed

+291
-165
lines changed

.github/workflows/package-smoketest.yml

+2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ env:
1717
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed for PR comments
1818
1919
DEBIAN_MIRROR: http://deb.debian.org/debian/
20+
DEBIAN_SECURITY_MIRROR: http://deb.debian.org/debian-security
2021
VYOS_MIRROR: https://packages.vyos.net/repositories/current/
2122

2223
jobs:
@@ -56,6 +57,7 @@ jobs:
5657
--build-type release \
5758
--custom-package vyos-1x-smoketest \
5859
--debian-mirror $DEBIAN_MIRROR \
60+
--debian-security-mirror $DEBIAN_SECURITY_MIRROR \
5961
--version ${{ steps.version.outputs.build_version }} \
6062
--vyos-mirror $VYOS_MIRROR \
6163
generic

CODEOWNERS

+2-1
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
* @vyos/reviewers
1+
# Users from reviewers github team
2+
* @dmbaturin @sarthurdev @jestabro @sever-sever @c-po @fett0 @nicolas-fort @zdc

data/templates/accel-ppp/ipoe.config.j2

+3-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@ lua-file={{ lua_file }}
5959
{% set relay = ',' ~ 'relay=' ~ iface_config.external_dhcp.dhcp_relay if iface_config.external_dhcp.dhcp_relay is vyos_defined else '' %}
6060
{% set giaddr = ',' ~ 'giaddr=' ~ iface_config.external_dhcp.giaddr if iface_config.external_dhcp.giaddr is vyos_defined else '' %}
6161
{% set username = ',' ~ 'username=lua:' ~ iface_config.lua_username if iface_config.lua_username is vyos_defined else '' %}
62-
{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start=dhcpv4,ipv6=1{{ relay }}{{ giaddr }}{{ username }}
62+
{% set start_map = {'dhcp': 'dhcpv4', 'unclassified-packet': 'up', 'auto': 'auto'} %}
63+
{% set start = start_map[iface_config.start_session] %}
64+
{{ tmp }},{{ shared }}mode={{ iface_config.mode | upper }},ifcfg=1,{{ range }}start={{ start }},ipv6=1{{ relay }}{{ giaddr }}{{ username }}
6365
{% if iface_config.vlan_mon is vyos_defined %}
6466
vlan-mon={{ iface }},{{ iface_config.vlan | join(',') }}
6567
{% endif %}

data/templates/chrony/chrony.conf.j2

+2-2
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ binddevice {{ interface }}
6767
{% endif %}
6868
{% endif %}
6969

70-
{% if ptp.timestamp.interface is vyos_defined %}
70+
{% if timestamp.interface is vyos_defined %}
7171
# Enable hardware timestamping on the specified interfaces
72-
{% for iface, iface_config in ptp.timestamp.interface.items() %}
72+
{% for iface, iface_config in timestamp.interface.items() %}
7373
{% if iface == "all" %}
7474
{% set iface = "*" %}
7575
{% endif %}

interface-definitions/container.xml.in

+1
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,7 @@
275275
</properties>
276276
<defaultValue>64</defaultValue>
277277
</leafNode>
278+
#include <include/name-server-ipv4-ipv6.xml.i>
278279
<tagNode name="network">
279280
<properties>
280281
<help>Attach user defined network to container</help>

interface-definitions/include/interface/default-route-distance.xml.i

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<help>Distance for installed default route</help>
55
<valueHelp>
66
<format>u32:1-255</format>
7-
<description>Distance for the default route from DHCP server</description>
7+
<description>Distance for the default route received from the server</description>
88
</valueHelp>
99
<constraint>
1010
<validator name="numeric" argument="--range 1-255"/>

interface-definitions/interfaces_pppoe.xml.in

+3
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@
2121
#include <include/interface/dial-on-demand.xml.i>
2222
#include <include/interface/no-default-route.xml.i>
2323
#include <include/interface/default-route-distance.xml.i>
24+
<leafNode name="default-route-distance">
25+
<defaultValue>1</defaultValue>
26+
</leafNode>
2427
#include <include/interface/dhcpv6-options.xml.i>
2528
#include <include/generic-description.xml.i>
2629
#include <include/interface/disable.xml.i>

interface-definitions/pki.xml.in

+7-1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,12 @@
3535
<multi/>
3636
</properties>
3737
</leafNode>
38+
<leafNode name="system-install">
39+
<properties>
40+
<help>Install into CA certificate store on router</help>
41+
<valueless/>
42+
</properties>
43+
</leafNode>
3844
#include <include/pki/cli-revoke.xml.i>
3945
</children>
4046
</tagNode>
@@ -74,7 +80,7 @@
7480
</constraint>
7581
</properties>
7682
</leafNode>
77-
#include <include/listen-address-ipv4-single.xml.i>
83+
#include <include/listen-address-single.xml.i>
7884
<leafNode name="rsa-key-size">
7985
<properties>
8086
<help>Size of the RSA key</help>

interface-definitions/service_ipoe-server.xml.in

+24
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,30 @@
131131
</properties>
132132
<defaultValue>shared</defaultValue>
133133
</leafNode>
134+
<leafNode name="start-session">
135+
<properties>
136+
<help>Start session options</help>
137+
<completionHelp>
138+
<list>auto dhcp unclassified-packet</list>
139+
</completionHelp>
140+
<valueHelp>
141+
<format>auto</format>
142+
<description>Start session with username as the interface name</description>
143+
</valueHelp>
144+
<valueHelp>
145+
<format>dhcp</format>
146+
<description>Start session on DHCPv4 Discover</description>
147+
</valueHelp>
148+
<valueHelp>
149+
<format>unclassified-packet</format>
150+
<description>Start session on unclassified-packet</description>
151+
</valueHelp>
152+
<constraint>
153+
<regex>(auto|dhcp|unclassified-packet)</regex>
154+
</constraint>
155+
</properties>
156+
<defaultValue>dhcp</defaultValue>
157+
</leafNode>
134158
<leafNode name="client-subnet">
135159
<properties>
136160
<help>Client address pool</help>

interface-definitions/service_ntp.xml.in

+48-48
Original file line numberDiff line numberDiff line change
@@ -13,72 +13,72 @@
1313
#include <include/generic-interface.xml.i>
1414
#include <include/listen-address.xml.i>
1515
#include <include/interface/vrf.xml.i>
16-
<node name="ptp">
16+
<node name="timestamp">
1717
<properties>
18-
<help>Enable Precision Time Protocol (PTP) transport</help>
18+
<help>Enable timestamping of packets in the NIC hardware</help>
1919
</properties>
2020
<children>
21-
#include <include/port-number.xml.i>
22-
<leafNode name="port">
23-
<defaultValue>319</defaultValue>
24-
</leafNode>
25-
<node name="timestamp">
21+
<tagNode name="interface">
2622
<properties>
27-
<help>Enable timestamping of packets in the NIC hardware</help>
23+
<help>Interface to enable timestamping on</help>
24+
<completionHelp>
25+
<script>${vyos_completion_dir}/list_interfaces</script>
26+
<list>all</list>
27+
</completionHelp>
28+
<valueHelp>
29+
<format>all</format>
30+
<description>Select all interfaces</description>
31+
</valueHelp>
32+
<valueHelp>
33+
<format>txt</format>
34+
<description>Interface name</description>
35+
</valueHelp>
36+
<constraint>
37+
#include <include/constraint/interface-name.xml.i>
38+
<regex>all</regex>
39+
</constraint>
2840
</properties>
2941
<children>
30-
<tagNode name="interface">
42+
<leafNode name="receive-filter">
3143
<properties>
32-
<help>Interface to enable timestamping on</help>
44+
<help>Selects which inbound packets are timestamped by the NIC</help>
3345
<completionHelp>
34-
<script>${vyos_completion_dir}/list_interfaces</script>
35-
<list>all</list>
46+
<list>all ntp ptp none</list>
3647
</completionHelp>
3748
<valueHelp>
3849
<format>all</format>
39-
<description>Select all interfaces</description>
50+
<description>All packets are timestamped</description>
4051
</valueHelp>
4152
<valueHelp>
42-
<format>txt</format>
43-
<description>Interface name</description>
53+
<format>ntp</format>
54+
<description>Only NTP packets are timestamped</description>
55+
</valueHelp>
56+
<valueHelp>
57+
<format>ptp</format>
58+
<description>Only PTP or NTP packets using the PTP transport are timestamped</description>
59+
</valueHelp>
60+
<valueHelp>
61+
<format>none</format>
62+
<description>No packet is timestamped</description>
4463
</valueHelp>
4564
<constraint>
46-
#include <include/constraint/interface-name.xml.i>
47-
<regex>all</regex>
65+
<regex>(all|ntp|ptp|none)</regex>
4866
</constraint>
4967
</properties>
50-
<children>
51-
<leafNode name="receive-filter">
52-
<properties>
53-
<help>Selects which inbound packets are timestamped by the NIC</help>
54-
<completionHelp>
55-
<list>all ntp ptp none</list>
56-
</completionHelp>
57-
<valueHelp>
58-
<format>all</format>
59-
<description>All packets are timestamped</description>
60-
</valueHelp>
61-
<valueHelp>
62-
<format>ntp</format>
63-
<description>Only NTP packets are timestamped</description>
64-
</valueHelp>
65-
<valueHelp>
66-
<format>ptp</format>
67-
<description>Only PTP or NTP packets using the PTP transport are timestamped</description>
68-
</valueHelp>
69-
<valueHelp>
70-
<format>none</format>
71-
<description>No packet is timestamped</description>
72-
</valueHelp>
73-
<constraint>
74-
<regex>(all|ntp|ptp|none)</regex>
75-
</constraint>
76-
</properties>
77-
</leafNode>
78-
</children>
79-
</tagNode>
68+
</leafNode>
8069
</children>
81-
</node>
70+
</tagNode>
71+
</children>
72+
</node>
73+
<node name="ptp">
74+
<properties>
75+
<help>Enable Precision Time Protocol (PTP) transport</help>
76+
</properties>
77+
<children>
78+
#include <include/port-number.xml.i>
79+
<leafNode name="port">
80+
<defaultValue>319</defaultValue>
81+
</leafNode>
8282
</children>
8383
</node>
8484
<leafNode name="leap-second">

op-mode-definitions/show-bridge.xml.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<properties>
6767
<help>Display bridge interface nexthop-group</help>
6868
</properties>
69-
<command>${vyos_op_scripts_dir}/bridge.py show_detail --nexthop_group --interface=$3</command>
69+
<command>${vyos_op_scripts_dir}/bridge.py show_detail --nexthop-group --interface=$3</command>
7070
</leafNode>
7171
</children>
7272
</tagNode>

op-mode-definitions/show-monitoring.xml.in

+59-3
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,68 @@
22
<interfaceDefinition>
33
<node name="show">
44
<children>
5-
<leafNode name="monitoring">
5+
<node name="monitoring">
66
<properties>
77
<help>Show currently monitored services</help>
88
</properties>
9-
<command>vtysh -c "show debugging"</command>
10-
</leafNode>
9+
<children>
10+
<node name="frr">
11+
<properties>
12+
<help>Show currently monitored FRR services</help>
13+
</properties>
14+
<command>vtysh -c "show debugging"</command>
15+
<children>
16+
<node name="zebra">
17+
<properties>
18+
<help>Show Zebra routing information</help>
19+
</properties>
20+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
21+
<children>
22+
<node name="client">
23+
<properties>
24+
<help>Client information</help>
25+
</properties>
26+
<children>
27+
<node name="summary">
28+
<properties>
29+
<help>Brief summary</help>
30+
</properties>
31+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
32+
</node>
33+
</children>
34+
</node>
35+
<node name="dplane">
36+
<properties>
37+
<help>Zebra dataplane information</help>
38+
</properties>
39+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
40+
</node>
41+
<node name="router">
42+
<properties>
43+
<help>Zebra router information</help>
44+
</properties>
45+
<children>
46+
<node name="table">
47+
<properties>
48+
<help>Zebra routing table information</help>
49+
</properties>
50+
<children>
51+
<node name="summary">
52+
<properties>
53+
<help>Summary information</help>
54+
</properties>
55+
<command>${vyos_op_scripts_dir}/vtysh_wrapper.sh "show ${@:4}"</command>
56+
</node>
57+
</children>
58+
</node>
59+
</children>
60+
</node>
61+
</children>
62+
</node>
63+
</children>
64+
</node>
65+
</children>
66+
</node>
1167
</children>
1268
</node>
1369
</interfaceDefinition>

op-mode-definitions/show-zebra.xml.in

-54
This file was deleted.

python/vyos/configtree.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -469,15 +469,15 @@ def mask_inclusive(left, right, libpath=LIBPATH):
469469

470470
return tree
471471

472-
def reference_tree_to_json(from_dir, to_file, libpath=LIBPATH):
472+
def reference_tree_to_json(from_dir, to_file, internal_cache="", libpath=LIBPATH):
473473
try:
474474
__lib = cdll.LoadLibrary(libpath)
475475
__reference_tree_to_json = __lib.reference_tree_to_json
476-
__reference_tree_to_json.argtypes = [c_char_p, c_char_p]
476+
__reference_tree_to_json.argtypes = [c_char_p, c_char_p, c_char_p]
477477
__get_error = __lib.get_error
478478
__get_error.argtypes = []
479479
__get_error.restype = c_char_p
480-
res = __reference_tree_to_json(from_dir.encode(), to_file.encode())
480+
res = __reference_tree_to_json(internal_cache.encode(), from_dir.encode(), to_file.encode())
481481
except Exception as e:
482482
raise ConfigTreeError(e)
483483
if res == 1:

0 commit comments

Comments
 (0)