mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 07:10:12 +01:00
ifcfg-rh: fix for three-digit prefixes
The regex only caught prefixes up to 99; anything over that was truncated to two digits.
This commit is contained in:
parent
50867cc461
commit
8e929b1e1b
2 changed files with 3 additions and 3 deletions
|
|
@ -975,9 +975,9 @@ read_route6_file (const char *filename, NMSettingIP6Config *s_ip6, GError **erro
|
|||
|
||||
const char *pattern_empty = "^\\s*(\\#.*)?$";
|
||||
const char *pattern_to1 = "^\\s*(" IPV6_ADDR_REGEX "|default)" /* IPv6 or 'default' keyword */
|
||||
"(?:/(\\d{1,2}))?"; /* optional prefix */
|
||||
"(?:/(\\d{1,3}))?"; /* optional prefix */
|
||||
const char *pattern_to2 = "to\\s+(" IPV6_ADDR_REGEX "|default)" /* IPv6 or 'default' keyword */
|
||||
"(?:/(\\d{1,2}))?"; /* optional prefix */
|
||||
"(?:/(\\d{1,3}))?"; /* optional prefix */
|
||||
const char *pattern_via = "via\\s+(" IPV6_ADDR_REGEX ")"; /* IPv6 of gateway */
|
||||
const char *pattern_metric = "metric\\s+(\\d+)"; /* metric */
|
||||
|
||||
|
|
|
|||
|
|
@ -6491,7 +6491,7 @@ test_write_wired_static (void)
|
|||
struct in6_addr ip6, ip6_1, ip6_2;
|
||||
struct in6_addr route1_dest, route2_dest, route1_nexthop, route2_nexthop;
|
||||
struct in6_addr dns6_1, dns6_2;
|
||||
const guint32 route1_prefix = 64, route2_prefix = 0;
|
||||
const guint32 route1_prefix = 64, route2_prefix = 128;
|
||||
const guint32 route1_metric = 99, route2_metric = 1;
|
||||
NMIP4Address *addr;
|
||||
NMIP6Address *addr6;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue