diff options
author | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-01-21 05:47:52 +0100 |
---|---|---|
committer | Matthias Schiffer <mschiffer@universe-factory.net> | 2015-01-21 05:47:52 +0100 |
commit | ceb66fb221184eb8f0136ac141ff6c2c8d3245fa (patch) | |
tree | 03f616b4ae3099092b2f5a9d22c28c2b1ef87d22 /src/socket.c | |
parent | eece4529cbc27eb8266cd9f47cf84c0d0a6b742a (diff) | |
download | fastd-ceb66fb221184eb8f0136ac141ff6c2c8d3245fa.tar fastd-ceb66fb221184eb8f0136ac141ff6c2c8d3245fa.zip |
Always disable PMTU discovery
fastd currently can't fragment packets anyways, so it doesn't make any sense to
perform PMTU discovery. This makes the config option `pmtu' a no-op.
Diffstat (limited to 'src/socket.c')
-rw-r--r-- | src/socket.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/socket.c b/src/socket.c index d464b6e..e932148 100644 --- a/src/socket.c +++ b/src/socket.c @@ -102,12 +102,10 @@ static int bind_socket(const fastd_bind_address_t *addr, bool warn) { #endif #ifdef USE_PMTU - if (conf.pmtu.set) { - int pmtu = conf.pmtu.state ? IP_PMTUDISC_DO : IP_PMTUDISC_DONT; - if (setsockopt(fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu))) { - pr_error_errno("setsockopt: unable to set PMTU discovery"); - goto error; - } + int pmtu = IP_PMTUDISC_DONT; + if (setsockopt(fd, IPPROTO_IP, IP_MTU_DISCOVER, &pmtu, sizeof(pmtu))) { + pr_error_errno("setsockopt: unable to disable PMTU discovery"); + goto error; } #endif |