let ipkg fail when a package file to be installed is not found
[openwrt.git] / openwrt / package / l2tpd / patches / 05-df-disable.patch
1 Patch to stop l2tpd setting the DF bit on each of the packets it sends.
2 Apart from not being useful with L2TP, this also prevents interoperating
3 with Cisco IOS over IPSEC.
4
5 --- l2tpd-0.70-pre20031121.orig/network.c.orig  2006-04-11 08:50:38.000000000 +0100
6 +++ l2tpd-0.70-pre20031121.orig/network.c       2006-04-11 08:58:18.000000000 +0100
7 @@ -56,6 +56,18 @@
8               __FUNCTION__);
9          return -EINVAL;
10      };
11 +#ifdef IP_MTU_DISCOVER
12 +#ifdef IP_PMTUDISC_DONT
13 +    {
14 +        /* Don't set DF bit on outbound packets */
15 +        int val = IP_PMTUDISC_DONT;
16 +        if (setsockopt(server_socket, IPPROTO_IP, IP_MTU_DISCOVER, &val, sizeof(val)) < 0)
17 +        {
18 +            log (LOG_LOG, "Failed to disable PMTU discovery\n");
19 +        }
20 +    }
21 +#endif
22 +#endif
23      /* L2TP/IPSec: Set up SA for listening port here?  NTB 20011015
24       */
25      if (bind (server_socket, (struct sockaddr *) &server, sizeof (server)))