]> git.ozlabs.org Git - ppp.git/commit - pppd/sys-solaris.c
Fix netif_set_mtu for Solaris
authorWHR <msl0000023508@gmail.com>
Tue, 10 Jul 2018 01:10:24 +0000 (09:10 +0800)
committerWHR <msl0000023508@gmail.com>
Mon, 27 May 2019 05:37:10 +0000 (13:37 +0800)
commit16e5b2f669ed3fc894db376fcc35f4420c19643b
treee5f4e70494612d23c922b762d5eeb43ccf25d7e7
parent5c765a67fd25f9d84e71ed61ace37c8c97f6be15
Fix netif_set_mtu for Solaris

The MTU setting for PPP interface is originally applied in function
ppp_send_config, this funcion sets a static variable 'link_mtu' from the
function argument 'mtu', then apply it to interface later using ioctl(2).
However during commit cffe80d, this ioctl(2) calling code was moved into a
separate function netif_set_mtu, with variable name 'link_mtu' unchanged.

This new function netif_set_mtu is intended to apply the MTU for interface,
from the passed argument 'mtu'; and it is called before ppp_send_config,
so 'link_mtu' won't get updated to the correct value when ioctl(2) is called;
the MTU value should be taken from argument 'mtu' instead of 'link_mtu'.

Signed-off-by: WHR <msl0000023508@gmail.com>
pppd/sys-solaris.c