mirror of https://gerrit.osmocom.org/libosmocore
gprs_ns2: fix check of MTU changes for frame relay
The frame relay needs 2 byte for data packets. Related: OS#5192 Change-Id: I02d4e81896a473aeb79ea2f2983e12324244048f
This commit is contained in:
parent
db7b2ab36b
commit
a6096ad367
|
@ -601,14 +601,18 @@ static void mtu_change(struct gprs_ns2_vc_bind *bind, uint32_t mtu)
|
|||
struct priv_bind *bpriv = bind->priv;
|
||||
struct gprs_ns2_nse *nse;
|
||||
|
||||
/* 2 byte DLCI header */
|
||||
if (mtu <= 2)
|
||||
return;
|
||||
mtu -= 2;
|
||||
|
||||
if (mtu == bind->mtu)
|
||||
return;
|
||||
|
||||
LOGBIND(bind, LOGL_INFO, "MTU changed from %d to %d.\n",
|
||||
bind->mtu, mtu);
|
||||
bind->mtu + 2, mtu + 2);
|
||||
|
||||
/* 2 byte DLCI header */
|
||||
bind->mtu = mtu - 2;
|
||||
bind->mtu = mtu;
|
||||
if (!bpriv->if_running)
|
||||
return;
|
||||
|
||||
|
|
Loading…
Reference in New Issue