]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
no longer look at client->network.
authorAlan T. DeKok <aland@freeradius.org>
Tue, 17 Apr 2018 19:30:25 +0000 (15:30 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Tue, 17 Apr 2018 19:30:25 +0000 (15:30 -0400)
It's only used for proto_radius, and should never have been here.

src/main/client.c

index df95e8277f5759235e06e34dc146404f75a0e040..e3667bf6cdf1ce615454ca22c0f2df7ac54ec52e 100644 (file)
@@ -1005,33 +1005,6 @@ RADCLIENT *client_afrom_request(TALLOC_CTX *ctx, REQUEST *request)
                return NULL;
        }
 
-       /*
-        *      Do some basic sanity checks.
-        */
-       if (request->client->network.af != c->ipaddr.af) {
-               fr_strerror_printf("Client IP address %pV IP version does not match the source network %pV of the packet.",
-                       fr_box_ipaddr(c->ipaddr), fr_box_ipaddr(request->client->network));
-               goto error;
-       }
-
-       /*
-        *      Network prefix is more restrictive than the one given
-        *      by the client... that's bad.
-        */
-       if (request->client->network.prefix > c->ipaddr.prefix) {
-               fr_strerror_printf("Client IP address %pV is not within the prefix with the defined network %pV",
-                                  fr_box_ipaddr(c->ipaddr), fr_box_ipaddr(request->client->network));
-               goto error;
-       }
-
-       ipaddr = c->ipaddr;
-       fr_ipaddr_mask(&ipaddr, request->client->network.prefix);
-       if (fr_ipaddr_cmp(&ipaddr, &request->client->network) != 0) {
-               fr_strerror_printf("Client IP address %pV is not within the defined network %pV.",
-                                  fr_box_ipaddr(c->ipaddr), fr_box_ipaddr(request->client->network));
-               goto error;
-       }
-
        return c;
 }