+ } else if (strcasecmp(key, "AddressFamily") == 0) {
+ char *af = NULL;
+ int status = config_set_string(key, &af, value);
+ if (status != 0)
+ return status;
+
+ if (strncmp(af, "any", 3) == 0) {
+ ping_af = AF_UNSPEC;
+ } else if (strncmp(af, "ipv4", 4) == 0) {
+ ping_af = AF_INET;
+ } else if (strncmp(af, "ipv6", 4) == 0) {
+ ping_af = AF_INET6;
+ } else {
+ WARNING("ping plugin: Ignoring invalid AddressFamily value %s", af);
+ }
+ free(af);
+