diff options
| author | Roy Marples <roy@marples.name> | 2009-01-01 20:51:04 +0000 |
|---|---|---|
| committer | Roy Marples <roy@marples.name> | 2009-01-01 20:51:04 +0000 |
| commit | c53cf4ef4b332cd1ff0cb1b0dc23fc193aebb892 (patch) | |
| tree | bc4b3e699a9a40ecf7eb74249ca0c89f2ccb7f61 /if-options.c | |
| parent | 91a44b91b06f127a98ae7f64e377e59d47eba329 (diff) | |
| download | dhcpcd-c53cf4ef4b332cd1ff0cb1b0dc23fc193aebb892.tar.xz | |
You can now add a configure block per ssid if the interface is wireless.
Diffstat (limited to 'if-options.c')
| -rw-r--r-- | if-options.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/if-options.c b/if-options.c index abbb92cc..4e8ddbfe 100644 --- a/if-options.c +++ b/if-options.c @@ -662,7 +662,7 @@ parse_config_line(struct if_options *ifo, const char *opt, char *line) } struct if_options * -read_config(const char *file, const char *ifname) +read_config(const char *file, const char *ifname, const char *ssid) { struct if_options *ifo; FILE *f; @@ -709,6 +709,14 @@ read_config(const char *file, const char *ifname) skip = 1; continue; } + /* Start of an ssid block, skip if not ours */ + if (strcmp(option, "ssid") == 0) { + if (ssid && line && strcmp(line, ssid) == 0) + skip = 0; + else + skip = 1; + continue; + } if (skip) continue; if (parse_config_line(ifo, option, line) != 1) { |
