1 diff -dur unbound-1.5.1.orig/services/listen_dnsport.c unbound-1.5.1/services/listen_dnsport.c
2 --- unbound-1.5.1.orig/services/listen_dnsport.c 2014-09-16 15:49:21.000000000 +0200
3 +++ unbound-1.5.1/services/listen_dnsport.c 2014-12-18 10:37:55.000000000 +0100
5 * (and also uses the interface mtu to determine the size of the packets).
6 * So there won't be any EMSGSIZE error. Against DNS fragmentation attacks.
7 * FreeBSD already has same semantics without setting the option. */
8 + int action, result = -1;
9 # if defined(IP_PMTUDISC_OMIT)
10 - int action = IP_PMTUDISC_OMIT;
12 - int action = IP_PMTUDISC_DONT;
13 + action = IP_PMTUDISC_OMIT;
14 + result = setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
15 + &action, (socklen_t)sizeof(action));
17 - if (setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
18 - &action, (socklen_t)sizeof(action)) < 0) {
20 + action = IP_PMTUDISC_DONT;
21 + result = setsockopt(s, IPPROTO_IP, IP_MTU_DISCOVER,
22 + &action, (socklen_t)sizeof(action));
25 log_err("setsockopt(..., IP_MTU_DISCOVER, "
26 -# if defined(IP_PMTUDISC_OMIT)