diff options
Diffstat (limited to 'host/lib')
-rw-r--r-- | host/lib/usrp/usrp2/usrp2_impl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp index cb4d793ab..505df662a 100644 --- a/host/lib/usrp/usrp2/usrp2_impl.cpp +++ b/host/lib/usrp/usrp2/usrp2_impl.cpp @@ -208,6 +208,12 @@ static mtu_result_t determine_mtu(const std::string &addr){ else max_send_mtu = mtu.send_mtu - 4; } + //don't trust the discovery if it lands slightly above default MTU + if (mtu.recv_mtu > udp_simple::mtu and mtu.recv_mtu <= udp_simple::mtu + 16) + mtu.recv_mtu = udp_simple::mtu; + if (mtu.send_mtu > udp_simple::mtu and mtu.send_mtu <= udp_simple::mtu + 16) + mtu.send_mtu = udp_simple::mtu; + return mtu; } |