From 011e6a2cdea8fca73f7c433de5e2d6bc22bd9c19 Mon Sep 17 00:00:00 2001 From: Christian Breunig Date: Fri, 10 Feb 2023 19:42:44 +0100 Subject: snmp: T4857: explicitly define default community networks 0.0.0.0/0 and ::/0 After the RESTRICTED view was introduced snmpd requires a network to be specified. Before adding the RESTRICTED view snmpd always assumed the default network 0.0.0.0/0. This commit re-adds the build in default networks for IPv4 and IPv6 and exposes it as a proper default to the CLI so the user is informed about it: vyos@vyos# set service snmp community foooo Possible completions: authorization Authorization type (default: ro) + client IP address of SNMP client allowed to contact system + network Subnet of SNMP client(s) allowed to contact system (default: 0.0.0.0/0, ::/0) --- interface-definitions/snmp.xml.in | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'interface-definitions') diff --git a/interface-definitions/snmp.xml.in b/interface-definitions/snmp.xml.in index 10dd828a5..592db7f4e 100644 --- a/interface-definitions/snmp.xml.in +++ b/interface-definitions/snmp.xml.in @@ -13,9 +13,9 @@ Community name - [a-zA-Z0-9\-_!@*#]{1,100} + [[:alnum:]-_!@*#]{1,100} - Community string is limited to alphanumerical characters, !, @, * and # with a total lenght of 100 + Community string is limited to alphanumerical characters, -, _, !, @, *, and # with a total lenght of 100 @@ -65,6 +65,7 @@ + 0.0.0.0/0 ::/0 -- cgit v1.2.3