Make patches apply agagin. The deleted parts were two times in the patches.
[openwrt/staging/yousong.git] / package / ppp / patches / 108-debian_pppatm_fix_mtu.patch
1 diff -Naur ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c
2 --- ppp-2.4.4.orig/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:23:41.000000000 -0400
3 +++ ppp-2.4.4/pppd/plugins/pppoatm/pppoatm.c 2009-05-07 16:23:57.000000000 -0400
4 @@ -179,8 +179,11 @@
5 int sock;
6 struct ifreq ifr;
7
8 - if (mtu > pppoatm_max_mtu)
9 - error("Couldn't increase MTU to %d", mtu);
10 + if (pppoatm_max_mtu && mtu > pppoatm_max_mtu) {
11 + warn("Couldn't increase MTU to %d. Using %d",
12 + mtu, pppoatm_max_mtu);
13 + mtu = pppoatm_max_mtu;
14 + }
15
16 sock = socket(AF_INET, SOCK_DGRAM, 0);
17 if (sock < 0)
18 @@ -198,8 +201,11 @@
19 int pcomp,
20 int accomp)
21 {
22 - if (mru > pppoatm_max_mru)
23 - error("Couldn't increase MRU to %d", mru);
24 + if (pppoatm_max_mru && mru > pppoatm_max_mru) {
25 + warn("Couldn't increase MRU to %d. Using %d",
26 + mru, pppoatm_max_mru);
27 + mru = pppoatm_max_mru;
28 + }
29 }
30
31 void plugin_init(void)