From: Samuel Thibault Date: Thu, 31 Dec 2020 04:47:56 +0000 (+0100) Subject: plugins/radius: Add support for the Framed-MTU Radius attribute (#192) X-Git-Tag: ppp-2.4.9~26 X-Git-Url: https://git.ozlabs.org/?a=commitdiff_plain;h=30705ecb56d5bdb1957e688dc78f76ed31cc7048;p=ppp.git 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 --- 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; }