diff options
| author | Michael Biebl <biebl@debian.org> | 2011-03-11 14:30:06 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2011-03-11 14:33:48 +0100 |
| commit | 43d693464a455e78329174694aed94c7c45d5521 (patch) | |
| tree | 5a3fb5390045f4dd9888093c8e8a1d3a7a5d5153 /debian | |
| parent | f2e3bcc5d4e6f22cd3d90def27c9c30dd3f45c7e (diff) | |
Normalize keys in ifupdown parser.
* debian/patches/51-normalized-keys.patch
- Normalize keys in ifupdown parser, so we accept options with either
hyphens or underscores, like e.g. bridge_ports and bridge-ports.
(Closes: #609831)
Diffstat (limited to 'debian')
| -rw-r--r-- | debian/changelog | 4 | ||||
| -rw-r--r-- | debian/patches/51-normalized-keys.patch | 37 | ||||
| -rw-r--r-- | debian/patches/series | 1 |
3 files changed, 42 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog index 521e88b3..dfc3d200 100644 --- a/debian/changelog +++ b/debian/changelog @@ -10,6 +10,10 @@ network-manager (0.8.1-6+squeeze1) UNRELEASED; urgency=low * debian/ifblacklist_migrate.sh - Only comment out iface lines if we have an exact match for the network interface. (Closes: #612247) + * debian/patches/51-normalized-keys.patch + - Normalize keys in ifupdown parser, so we accept options with either + hyphens or underscores, like e.g. bridge_ports and bridge-ports. + (Closes: #609831) -- Michael Biebl <biebl@debian.org> Sat, 22 Jan 2011 16:53:48 +0100 diff --git a/debian/patches/51-normalized-keys.patch b/debian/patches/51-normalized-keys.patch new file mode 100644 index 00000000..8411ca8b --- /dev/null +++ b/debian/patches/51-normalized-keys.patch @@ -0,0 +1,37 @@ +Index: network-manager/system-settings/plugins/ifupdown/interface_parser.c +=================================================================== +--- network-manager.orig/system-settings/plugins/ifupdown/interface_parser.c 2011-03-06 20:49:32.229089569 +0100 ++++ network-manager/system-settings/plugins/ifupdown/interface_parser.c 2011-03-06 20:53:09.749089571 +0100 +@@ -51,6 +51,7 @@ + void add_data(const char *key,const char *data) + { + if_data *ret; ++ char *idx; + + // Check if there is a block where we can attach our data + if (first == NULL) +@@ -58,6 +59,11 @@ + + ret = (if_data*) calloc(1,sizeof(struct _if_data)); + ret->key = g_strdup(key); ++ // Normalize keys. Convert '_' to '-', as ifupdown accepts both variants. ++ // When querying keys via ifparser_getkey(), use '-'. ++ while ((idx = strrchr(ret->key, '_'))) { ++ *idx = '-'; ++ } + ret->data = g_strdup(data); + + if (last->info == NULL) +Index: network-manager/system-settings/plugins/ifupdown/plugin.c +=================================================================== +--- network-manager.orig/system-settings/plugins/ifupdown/plugin.c 2011-03-06 20:49:36.721089570 +0100 ++++ network-manager/system-settings/plugins/ifupdown/plugin.c 2011-03-06 20:50:13.493089573 +0100 +@@ -368,7 +368,7 @@ + /* Bridge configuration */ + if(!strncmp ("br", block->name, 2)) { + /* Try to find bridge ports */ +- const char *ports = ifparser_getkey (block, "bridge_ports"); ++ const char *ports = ifparser_getkey (block, "bridge-ports"); + if (ports) { + PLUGIN_PRINT("SCPlugin-Ifupdown", "found bridge ports %s for %s", ports, block->name); + char **port_ifaces = g_strsplit_set (ports, " \t", -1); diff --git a/debian/patches/series b/debian/patches/series index a5a98334..610d86dc 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -4,5 +4,6 @@ 30-typo_fix.patch 40-umanaged-interfaces.patch 50-bridge-interfaces.patch +51-normalized-keys.patch 82-core-handle-device-removal.patch 83-dnsmasq-send-no-config-file-instead-of-a-bogus-one.patch |