Ensure AF for src IP matches AF for dst IP
authorAlan T. DeKok <aland@freeradius.org>
Wed, 25 May 2011 09:43:35 +0000 (11:43 +0200)
committerAlan T. DeKok <aland@freeradius.org>
Wed, 25 May 2011 09:43:35 +0000 (11:43 +0200)
src/main/realms.c

index 3196ea4..e063e54 100644 (file)
@@ -570,6 +570,14 @@ static int home_server_add(realm_config_t *rc, CONF_SECTION *cs)
                        goto error;
                }
        }
+
+       /*
+        *      Make sure that this is set.
+        */
+       if (home->src_ipaddr.af == AF_UNSPEC) {
+               home->src_ipaddr.af = home->ipaddr.af;
+       }
+
        free(hs_srcipaddr);
        hs_srcipaddr = NULL;