Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 691039 Details for
Bug 906432
Corosync 1.4.1 does not support IPv6 double colon notation in /etc/corosync/corosync.conf totem section
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
Proposed patch - part 1 - Handle colon on end of value
2013-01-31-0001-flatiron-Handle-colon-in-configuration-file.patch (text/plain), 2.49 KB, created by
Jan Friesse
on 2013-01-31 16:00:51 UTC
(
hide
)
Description:
Proposed patch - part 1 - Handle colon on end of value
Filename:
MIME Type:
Creator:
Jan Friesse
Created:
2013-01-31 16:00:51 UTC
Size:
2.49 KB
patch
obsolete
>From f3444a0eaff0bf5524898247ae938c5117177f67 Mon Sep 17 00:00:00 2001 >From: Jan Friesse <jfriesse@redhat.com> >Date: Thu, 31 Jan 2013 16:15:24 +0100 >Subject: [PATCH 1/2] Handle colon in configuration file > >If colon was entered as part of value on end of value, it is deleted. >This makes impossible to enter (legal) IPv6 address ending with :: (like >fed0::). > >Also when line contains both brace and colon, it is parsed twice (first >as key = value and second as start of section). This is >handled by continue in if section. > >Signed-off-by: Jan Friesse <jfriesse@redhat.com> >Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com> >(backport from needle) >--- > exec/coroparse.c | 14 +++++++++----- > 1 files changed, 9 insertions(+), 5 deletions(-) > >diff --git a/exec/coroparse.c b/exec/coroparse.c >index 29b44a6..ad4c1b9 100644 >--- a/exec/coroparse.c >+++ b/exec/coroparse.c >@@ -87,12 +87,12 @@ static int aisparser_readconfig (struct objdb_iface_ver0 *objdb, > } > > >-static char *remove_whitespace(char *string) >+static char *remove_whitespace(char *string, int remove_colon_and_brace) > { > char *start = string+strspn(string, " \t"); > char *end = start+(strlen(start))-1; > >- while ((*end == ' ' || *end == '\t' || *end == ':' || *end == '{') && end > start) >+ while ((*end == ' ' || *end == '\t' || (remove_colon_and_brace && (*end == ':' || *end == '{'))) && end > start) > end--; > if (end != start) > *(end+1) = '\0'; >@@ -157,7 +157,7 @@ static int parse_section(FILE *fp, > /* New section ? */ > if ((loc = strchr_rs (line, '{'))) { > hdb_handle_t new_parent; >- char *section = remove_whitespace(line); >+ char *section = remove_whitespace(line, 1); > > loc--; > *loc = '\0'; >@@ -171,6 +171,8 @@ static int parse_section(FILE *fp, > section, strlen (section)); > if (parse_section(fp, objdb, new_parent, error_string, parser_check_item_call)) > return -1; >+ >+ continue ; > } > > /* New key/value */ >@@ -179,8 +181,8 @@ static int parse_section(FILE *fp, > char *value; > > *(loc-1) = '\0'; >- key = remove_whitespace(line); >- value = remove_whitespace(loc); >+ key = remove_whitespace(line, 1); >+ value = remove_whitespace(loc, 0); > if (parser_check_item_call) { > if (!parser_check_item_call(objdb, parent_handle, PCHECK_ADD_ITEM, > key, error_string)) >@@ -188,6 +190,8 @@ static int parse_section(FILE *fp, > } > objdb->object_key_create_typed (parent_handle, key, > value, strlen (value) + 1, OBJDB_VALUETYPE_STRING); >+ >+ continue ; > } > > if (strchr_rs (line, '}')) { >-- >1.7.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 906432
: 691039 |
691040