]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
print out addresses, too
authorAlan T. DeKok <aland@freeradius.org>
Mon, 27 Nov 2017 19:27:26 +0000 (14:27 -0500)
committerAlan T. DeKok <aland@freeradius.org>
Mon, 27 Nov 2017 19:27:26 +0000 (14:27 -0500)
src/main/client.c

index f20cc711ba1af64d2a47b3a074512e2f70eff2ee..79fc49b6d629feb9f62fcb30a934cb63b452a041 100644 (file)
@@ -950,7 +950,8 @@ RADCLIENT *client_afrom_request(TALLOC_CTX *ctx, REQUEST *request)
         *      Do some basic sanity checks.
         */
        if (request->client->network.af != c->ipaddr.af) {
-               fr_strerror_printf("Client IP address MUST match the source IP address of the packet.");
+               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;
        }
 
@@ -959,14 +960,16 @@ RADCLIENT *client_afrom_request(TALLOC_CTX *ctx, REQUEST *request)
         *      by the client... that's bad.
         */
        if (request->client->network.prefix > c->ipaddr.prefix) {
-               fr_strerror_printf("Client IP address MUST have a prefix with the defined network");
+               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 MUST be within the defined network.");
+               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;
        }