]> git.ozlabs.org Git - ppp.git/commitdiff
plugins/radius: Add RFC8044 dictionary compatibility for IPv4 address (#291)
authorAdrian <1823016+EasyNetDev@users.noreply.github.com>
Fri, 16 Jul 2021 09:24:13 +0000 (12:24 +0300)
committerGitHub <noreply@github.com>
Fri, 16 Jul 2021 09:24:13 +0000 (19:24 +1000)
This patch adds ipv4addr RADIUS data type compatible with RFC8044.
New dictionaries from RADIUS is using ipv4addr instead of old
ipaddr data type. This patch is avoiding modification of RADIUS
dictionaries to be compatible with PPP.

Signed-off-by: Adrian Ban <devel@easynet.dev>
pppd/plugins/radius/dict.c

index 3b2add2ae4e7cbc7fe84b67b83a3722d4b8e6f73..6f2657d719ae4a3806c7e67eb85207640b171050 100644 (file)
@@ -150,7 +150,7 @@ int rc_read_dictionary (char *filename)
                        {
                                type = PW_TYPE_INTEGER;
                        }
-                       else if (strcmp (typestr, "ipaddr") == 0)
+                       else if (strcmp (typestr, "ipaddr") == 0 || strcmp (typestr, "ipv4addr") == 0)
                        {
                                type = PW_TYPE_IPADDR;
                        }