]> git.ozlabs.org Git - ppp.git/commitdiff
plugins/radius: Add support for the Framed-MTU Radius attribute (#192)
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Thu, 31 Dec 2020 04:47:56 +0000 (05:47 +0100)
committerGitHub <noreply@github.com>
Thu, 31 Dec 2020 04:47:56 +0000 (15:47 +1100)
This allows radius plugin to deal with Framed-MTU Radius attribute and to
set MTU on interface.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Co-authored-by: Alexander Klepikov <klepikov_a@up.ua>
pppd/plugins/radius/radius.c

index 5f75aaedc54b6afb63b31fa4b07566e551bb5c38..c5798316719af431a6f1dc6926845bde76b95b88 100644 (file)
@@ -651,6 +651,9 @@ radius_setparams(VALUE_PAIR *vp, char *msg, REQUEST_INFO *req_info,
                    memcpy(rstate.class, vp->strvalue, rstate.class_len);
                } /* else too big for our buffer - ignore it */
                break;
+           case PW_FRAMED_MTU:
+               netif_set_mtu(rstate.client_port,MIN(netif_get_mtu(rstate.client_port),vp->lvalue));
+               break;
            }