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:
Dan Williams 2011-07-05 23:27:50 -05:00
parent 50867cc461
commit 8e929b1e1b
2 changed files with 3 additions and 3 deletions

View file

@ -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 */

View file

@ -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;