ports/net/mpd5/files/patch-overhead
Eugene Grosbein c905861573
net/mpd5: minor improvements
Import several improvement from upstream:

* r2408,2409 - use SOCK_CLOEXEC for all sockets including PPtP,
  web and telnet consoles, so that subprocesses like ip-up/down scripts
  do not inherit such sockets;
* r2415 - avoid inadequate MTU undervalueing when bundle compression
  and/or encryption configured but not negotiated;
  f.e. PPPoE interface MTU could be set to 1490 instead of 1492 previously;
* r2482,2483 - improve client-side implementation of PPP-Max-Payload (RFC4638)
  and do not limit "set pppoe max-payload {size}" to 1510
  but use MTU of parent interface minus 8, as per RFC;
  also, relax sanity check for "set link mtu/mru" in case of PPPoE,
  so that it is possible to configure values like 1500 and over, if needed.
2023-03-30 09:37:05 +07:00

18 lines
694 B
Text

Index: src/bund.c
===================================================================
--- src/bund.c (revision 2414)
+++ src/bund.c (revision 2415)
@@ -900,9 +900,11 @@ BundUpdateParams(Bund b)
/* Subtract to make room for various frame-bloating protocols */
if (b->n_up > 0) {
- if (Enabled(&b->conf.options, BUND_CONF_COMPRESSION))
+ if (Enabled(&b->conf.options, BUND_CONF_COMPRESSION) &&
+ b->pppConfig.bund.enableCompression)
mtu = CcpSubtractBloat(b, mtu);
- if (Enabled(&b->conf.options, BUND_CONF_ENCRYPTION))
+ if (Enabled(&b->conf.options, BUND_CONF_ENCRYPTION) &&
+ b->pppConfig.bund.enableEncryption)
mtu = EcpSubtractBloat(b, mtu);
}