Merge pull request #38 from amnezia-vpn/fix/android-i1-i5

fix: allow empty I2-I5 params awg2
This commit is contained in:
Yaroslav Gurov
2026-02-23 12:52:11 +01:00
committed by GitHub

View File

@@ -1284,13 +1284,17 @@ static void parse_options(char **iface, char **config, unsigned int *mtu, char *
is_awg_on = true;
} else if (!strncasecmp(clean, "I1=", 3) && j > 4) {
is_awg_on = true;
} else if (!strncasecmp(clean, "I2=", 3) && j > 4) {
} else if (!strncasecmp(clean, "I2=", 3) && j >= 3) {
// I2 can be empty, so we only check for the prefix
is_awg_on = true;
} else if (!strncasecmp(clean, "I3=", 3) && j > 4) {
} else if (!strncasecmp(clean, "I3=", 3) && j >= 3) {
// I3 can be empty, so we only check for the prefix
is_awg_on = true;
} else if (!strncasecmp(clean, "I4=", 3) && j > 4) {
} else if (!strncasecmp(clean, "I4=", 3) && j >= 3) {
// I4 can be empty, so we only check for the prefix
is_awg_on = true;
} else if (!strncasecmp(clean, "I5=", 3) && j > 4) {
} else if (!strncasecmp(clean, "I5=", 3) && j >= 3) {
// I5 can be empty, so we only check for the prefix
is_awg_on = true;
}
}