Bug 991807 - ifcfg-rh generates error: Invalid IP6 route destination address 'defa'
ifcfg-rh generates error: Invalid IP6 route destination address 'defa'
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: NetworkManager (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Dan Williams
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-04 10:43 EDT by Wendell Baker
Modified: 2014-06-10 03:40 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-06-10 03:40:42 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
A hack ... install in /etc/NetworkManager/dispatcher.d ... it will parse the default routes that ifcfg-rh cannot (3.56 KB, application/x-shellscript)
2013-08-04 10:43 EDT, Wendell Baker
no flags Details

  None (edit)
Description Wendell Baker 2013-08-04 10:43:19 EDT
Created attachment 782501 [details]
A hack ... install in /etc/NetworkManager/dispatcher.d ... it will parse the default routes that ifcfg-rh cannot

Description of problem:

NetworkManager's ifcfg-rh will not establish a default route in IPv6

Version-Release number of selected component (if applicable):

$ rpm -q -f /usr/lib/NetworkManager/libnm-settings-plugin-ifcfg-rh.so 
NetworkManager-0.9.8.2-8.git20130709.fc19.i686
$ uname -a
Linux athletic 3.10.3-300.fc19.i686.PAE #1 SMP Fri Jul 26 00:12:34 UTC 2013 i686 i686 i386 GNU/Linux


How reproducible:

100%

Steps to Reproduce:
1. edit /etc/sysconfig/network-scripts/route6-em1 to contain a default route
2. text: 
    table some-table-name to default via 2001:0db8:1:1:1:1:1:1 dev em1 metric 1024
3. Bring up the interface

Actual results:


ifcfg-rh:     error: Invalid IP6 route destination address 'defa'


Expected results:

A working default route


Additional info:

The workaround is to manually apply the route with a hack/patch script in /etc/NetworkManager/dispatcher.d -- see 02-default-routes-ifcfg-rh included nearby.  

A patch suggested seems to be here
https://mail.gnome.org/archives/networkmanager-list/2013-January/msg00095.html
Depending upon the delicate ordering of subterms in a regex disjunction for a major function such as this seems ... fraught.


This patch is not in the source of NetworkManager-0.9.8.2

(in toto)
--- ./src/settings/plugins/ifcfg-rh/reader.c.ORIG	2013-01-21 16:59:46.000000000 +0100
+++ ./src/settings/plugins/ifcfg-rh/reader.c	2013-01-21 17:04:23.000000000 +0100
@@ -1041,9 +1041,9 @@
 	gboolean success = FALSE;
 
 	const char *pattern_empty = "^\\s*(\\#.*)?$";
-	const char *pattern_to1 = "^\\s*(" IPV6_ADDR_REGEX "|default)"  /* IPv6 or 'default' keyword */
+	const char *pattern_to1 = "^\\s*(default|" IPV6_ADDR_REGEX ")"  /* IPv6 or 'default' keyword */
 	                          "(?:/(\\d{1,3}))?";                   /* optional prefix */
-	const char *pattern_to2 = "to\\s+(" IPV6_ADDR_REGEX "|default)" /* IPv6 or 'default' keyword */
+	const char *pattern_to2 = "to\\s+(default|" IPV6_ADDR_REGEX ")" /* IPv6 or 'default' keyword */
 	                          "(?:/(\\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 */
Comment 1 Jirka Klimes 2013-10-07 12:26:49 EDT
Fixed upstream, but we rather ignore "default" route because NM handles it automatically:
http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=2af8c08f6591b5b199bff1775d845c47ac131d58

(also in nm-0-9-8 as 56d033a5c727c3d03609ab38e58a6a98b6dcb188)

Note You need to log in before you can comment on or make changes to this bug.