From 30705ecb56d5bdb1957e688dc78f76ed31cc7048 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Thu, 31 Dec 2020 05:47:56 +0100 Subject: [PATCH] plugins/radius: Add support for the Framed-MTU Radius attribute (#192) This allows radius plugin to deal with Framed-MTU Radius attribute and to set MTU on interface. Signed-off-by: Samuel Thibault Co-authored-by: Alexander Klepikov --- pppd/plugins/radius/radius.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pppd/plugins/radius/radius.c b/pppd/plugins/radius/radius.c index 5f75aae..c579831 100644 --- a/pppd/plugins/radius/radius.c +++ b/pppd/plugins/radius/radius.c @@ -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; } -- 2.39.2