Hi Validimir,

Le Sunday 26 July 2009 10:45:38 Vladimir Voronkov, vous avez écrit :
> This patch changes version of ppp to 2.4.4, which is required for
> openl2tp-1.6 to work. Patch with integration of openl2tp will be sent in my
> next email.
>
> All current patches to ppp-2.4.3 are changed according to a new version of
> ppp, some of them are removed (namely 102, 202, 205, 207) because they
> already exist in ppp-2.4.4.

ppp-2.4.4 has been updated a while already, so I have only applied the 
kmod-pppol2tp part of this patch. Also PPP over L2TP only appeared in 2.6.28 
therefore the module is restricted to the kernel versions it can be built on.

>
> Also kmod-pppol2tp kernel module has been added in configuration.
>
> Signed-off-by: Vladimir Voronkov <voronkovv at mail.ru>
>
> ---
>
> Index: package/kernel/modules/network.mk
> ===================================================================
> --- package/kernel/modules/network.mk (revision 16973)
> +++ package/kernel/modules/network.mk (working copy)
> @@ -367,6 +367,7 @@
>    FILES:= \
>       $(LINUX_DIR)/drivers/net/pppoe.$(LINUX_KMOD_SUFFIX) \
>       $(LINUX_DIR)/drivers/net/pppox.$(LINUX_KMOD_SUFFIX)
> +  AUTOLOAD:=$(call AutoLoad,40,pppox pppoe)
>  endef
>
>  define KernelPackage/pppoe/description
> @@ -376,6 +377,22 @@
>  $(eval $(call KernelPackage,pppoe))
>
>
> +define KernelPackage/pppol2tp
> +  SUBMENU:=$(NETWORK_SUPPORT_MENU)
> +  TITLE:=PPPoL2TP support
> +  DEPENDS:=kmod-ppp +kmod-pppoe
> +  KCONFIG:=CONFIG_PPPOL2TP
> +  FILES:=$(LINUX_DIR)/drivers/net/pppol2tp.$(LINUX_KMOD_SUFFIX)
> +  AUTOLOAD:=$(call AutoLoad,40,pppol2tp)
> +endef
> +
> +define KernelPackage/pppol2tp/description
> + Kernel modules for PPPoL2TP (PPP over L2TP) support
> +endef
> +
> +$(eval $(call KernelPackage,pppol2tp))
> +
> +
>  define KernelPackage/pppoa
>    SUBMENU:=$(NETWORK_SUPPORT_MENU)
>    TITLE:=PPPoA support
> Index: package/ppp/patches/101-debian_ip-up_option.patch
> ===================================================================
> --- package/ppp/patches/101-debian_ip-up_option.patch (revision 16973)
> +++ package/ppp/patches/101-debian_ip-up_option.patch (working copy)
> @@ -2,37 +2,37 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/ipcp.c       2007-06-04 13:22:08.478566344 +0200
>  +++ ppp-2.4.3/pppd/ipcp.c    2007-06-04 13:22:09.003486544 +0200
> -@@ -1846,7 +1846,7 @@
> +@@ -1850,7 +1850,7 @@
>        */
>       if (ipcp_script_state == s_down && ipcp_script_pid == 0) {
>       ipcp_script_state = s_up;
> --    ipcp_script(_PATH_IPUP);
> -+    ipcp_script(path_ipup);
> +-    ipcp_script(_PATH_IPUP, 0);
> ++    ipcp_script(path_ipup, 0);
>       }
>   }
>
> -@@ -1896,7 +1896,7 @@
> +@@ -1900,7 +1900,7 @@
>       /* Execute the ip-down script */
>       if (ipcp_script_state == s_up && ipcp_script_pid == 0) {
>       ipcp_script_state = s_down;
> --    ipcp_script(_PATH_IPDOWN);
> -+    ipcp_script(path_ipdown);
> +-    ipcp_script(_PATH_IPDOWN, 0);
> ++    ipcp_script(path_ipdown, 0);
>       }
>   }
>
> -@@ -1950,13 +1950,13 @@
> +@@ -1954,13 +1954,13 @@
>       case s_up:
>       if (ipcp_fsm[0].state != OPENED) {
>           ipcp_script_state = s_down;
> --        ipcp_script(_PATH_IPDOWN);
> -+        ipcp_script(path_ipdown);
> +-        ipcp_script(_PATH_IPDOWN, 0);
> ++        ipcp_script(path_ipdown, 0);
>       }
>       break;
>       case s_down:
>       if (ipcp_fsm[0].state == OPENED) {
>           ipcp_script_state = s_up;
> --        ipcp_script(_PATH_IPUP);
> -+        ipcp_script(path_ipup);
> +-        ipcp_script(_PATH_IPUP, 0);
> ++        ipcp_script(path_ipup, 0);
>       }
>       break;
>       }
> @@ -40,7 +40,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/main.c       2007-06-04 13:22:08.487564976 +0200
>  +++ ppp-2.4.3/pppd/main.c    2007-06-04 13:22:09.004486392 +0200
> -@@ -314,6 +314,9 @@
> +@@ -315,6 +315,9 @@
>       struct protent *protp;
>       char numbuf[16];
>
> @@ -54,7 +54,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/options.c    2007-06-04 13:22:08.495563760 +0200
>  +++ ppp-2.4.3/pppd/options.c 2007-06-04 13:22:09.005486240 +0200
> -@@ -108,6 +108,8 @@
> +@@ -113,6 +113,8 @@
>   bool        tune_kernel;            /* may alter kernel settings */
>   int connect_delay = 1000;   /* wait this many ms after connect script */
>   int req_unit = -1;          /* requested interface unit */
> @@ -63,7 +63,7 @@
>   bool        multilink = 0;          /* Enable multilink operation */
>   char        *bundle_name = NULL;    /* bundle name for multilink */
>   bool        dump_options;           /* print out option values */
> -@@ -276,6 +278,13 @@
> +@@ -281,6 +283,13 @@
>         "Number of seconds to wait for child processes at exit",
>         OPT_PRIO },
>
> Index: package/ppp/patches/202-atm_fix.patch (deleted)
> ===================================================================
> Index: package/ppp/patches/209-compensate_time_change.patch
> ===================================================================
> --- package/ppp/patches/209-compensate_time_change.patch      (revision 16973)
> +++ package/ppp/patches/209-compensate_time_change.patch      (working copy)
> @@ -18,7 +18,7 @@
>   static void setup_signals __P((void));
>   static void create_pidfile __P((int pid));
>   static void create_linkpidfile __P((int pid));
> -@@ -531,6 +533,7 @@
> +@@ -532,6 +534,7 @@
>           info("Starting link");
>       }
>
> @@ -26,7 +26,7 @@
>       gettimeofday(&start_time, NULL);
>       script_unsetenv("CONNECT_TIME");
>       script_unsetenv("BYTES_SENT");
> -@@ -1195,6 +1198,36 @@
> +@@ -1264,6 +1267,36 @@
>
>   static struct callout *callout = NULL;      /* Callout list */
>   static struct timeval timenow;              /* Current time */
> @@ -63,7 +63,7 @@
>
>   /*
>    * timeout - Schedule a timeout.
> -@@ -1265,6 +1298,8 @@
> +@@ -1334,6 +1367,8 @@
>   {
>       struct callout *p;
>
> @@ -72,7 +72,7 @@
>       while (callout != NULL) {
>       p = callout;
>
> -@@ -1292,6 +1327,8 @@
> +@@ -1361,6 +1396,8 @@
>   {
>       if (callout == NULL)
>       return NULL;
> Index: package/ppp/patches/103-debian_pppoe_cleanup.patch
> ===================================================================
> --- package/ppp/patches/103-debian_pppoe_cleanup.patch        (revision 16973)
> +++ package/ppp/patches/103-debian_pppoe_cleanup.patch        (working copy)
> @@ -875,7 +875,7 @@
>
>       return conn->sessionSocket;
>   }
> -@@ -365,11 +362,9 @@
> +@@ -320,11 +317,9 @@
>       }
>
>       add_options(Options);
> @@ -888,14 +888,14 @@
>   /**********************************************************************
>   *%FUNCTION: fatalSys
>   *%ARGUMENTS:
> -@@ -423,6 +418,7 @@
> +@@ -378,6 +373,7 @@
>   {
>       rp_fatal(str);
>   }
>  +#endif
>
> -
> - struct channel pppoe_channel = {
> + void pppoe_check_options(void)
> + {
>  Index: ppp-2.4.3/pppd/plugins/rp-pppoe/pppoe-discovery.c
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/plugins/rp-pppoe/pppoe-discovery.c   2007-06-04
> 13:22:08.420575160 +0200 Index: package/ppp/patches/201-mppe_mppc_1.1.patch
> ===================================================================
> --- package/ppp/patches/201-mppe_mppc_1.1.patch       (revision 16973)
> +++ package/ppp/patches/201-mppe_mppc_1.1.patch       (working copy)
> @@ -648,7 +648,7 @@
>       if (go->deflate) {
>       p[0] = go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT;
>       p[1] = CILEN_DEFLATE;
> -@@ -802,7 +961,7 @@
> +@@ -802,33 +961,53 @@
>
>   /*
>    * ccp_ackci - process a received configure-ack, and return
> @@ -657,7 +657,8 @@
>    */
>   static int
>   ccp_ackci(f, p, len)
> -@@ -811,24 +970,44 @@
> +     fsm *f;
> +     u_char *p;
>       int len;
>   {
>       ccp_options *go = &ccp_gotoptions[f->unit];
> @@ -711,7 +712,7 @@
>       if (go->deflate) {
>       if (len < CILEN_DEFLATE
>
>           || p[0] != (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
>
> -@@ -891,7 +1070,7 @@
> +@@ -891,16 +1071,18 @@
>
>   /*
>    * ccp_nakci - process received configure-nak.
> @@ -720,8 +721,10 @@
>    */
>   static int
>   ccp_nakci(f, p, len, treat_as_reject)
> -@@ -900,6 +1079,8 @@
> +     fsm *f;
> +     u_char *p;
>       int len;
> +     int treat_as_reject;
>   {
>       ccp_options *go = &ccp_gotoptions[f->unit];
>  +    ccp_options *ao = &ccp_allowoptions[f->unit];
> @@ -729,7 +732,7 @@
>       ccp_options no;         /* options we've seen already */
>       ccp_options try;                /* options to ask for next time */
>
> -@@ -907,28 +1088,100 @@
> +@@ -908,28 +1089,100 @@
>       try = *go;
>
>   #ifdef MPPE
> @@ -848,7 +851,7 @@
>       if (go->deflate && len >= CILEN_DEFLATE
>       && p[0] == (go->deflate_correct? CI_DEFLATE: CI_DEFLATE_DRAFT)
>       && p[1] == CILEN_DEFLATE) {
> -@@ -1001,14 +1254,50 @@
> +@@ -1002,14 +1255,50 @@
>       return -1;
>
>   #ifdef MPPE
> @@ -903,7 +906,7 @@
>       if (go->deflate_correct && len >= CILEN_DEFLATE
>       && p[0] == CI_DEFLATE && p[1] == CILEN_DEFLATE) {
>       if (p[2] != DEFLATE_MAKE_OPT(go->deflate_size)
> -@@ -1072,14 +1361,15 @@
> +@@ -1073,14 +1362,15 @@
>       int dont_nak;
>   {
>       int ret, newret, res;
> @@ -923,7 +926,7 @@
>
>       ret = CONFACK;
>       retp = p0 = p;
> -@@ -1102,103 +1392,305 @@
> +@@ -1103,106 +1393,305 @@
>           switch (type) {
>   #ifdef MPPE
>           case CI_MPPE:
> @@ -936,10 +939,6 @@
>
>  -            /* Nak if anything unsupported or unknown are set. */
>  -            if (ho->mppe & MPPE_OPT_UNSUPPORTED) {
> --                newret = CONFNAK;
> --                ho->mppe &= ~MPPE_OPT_UNSUPPORTED;
> --            }
> --            if (ho->mppe & MPPE_OPT_UNKNOWN) {
>  +            p2 = p[2];
>  +            p5 = p[5];
>  +            /* not sure what they want, tell 'em what we got */
> @@ -948,6 +947,10 @@
>  +                           MPPE_MPPC)) != 0 || p[5] == 0) ||
>  +                (p[2] == 0 && p[3] == 0 && p[4] == 0 &&  p[5] == 0)) {
>                   newret = CONFNAK;
> +-                ho->mppe &= ~MPPE_OPT_UNSUPPORTED;
> +-            }
> +-            if (ho->mppe & MPPE_OPT_UNKNOWN) {
> +-                newret = CONFNAK;
>  -                ho->mppe &= ~MPPE_OPT_UNKNOWN;
>  +                p[2] = (wo->mppe_stateless ? MPPE_STATELESS : 0);
>  +                p[3] = 0;
> @@ -1090,7 +1093,10 @@
>  +                        goto check_mppe_40;
>  +                    }
>  +                    goto check_mppe;
> -+                }
> +                 }
> +-            } else {
> +-                /* Neither are set. */
> +-                /* We cannot accept this.  */
>  +                p[5] &= ~MPPE_128BIT;
>  +                goto check_mppe_40;
>  +            }
> @@ -1109,7 +1115,28 @@
>  +                    goto check_mppe;
>  +                }
>  +                p[5] &= ~MPPE_128BIT;
> -+                newret = CONFNAK;
> +                 newret = CONFNAK;
> +-                /* Give the peer our idea of what can be used,
> +-                   so it can choose and confirm */
> +-                ho->mppe = ao->mppe;
> +-            }
> +-
> +-            /* rebuild the opts */
> +-            MPPE_OPTS_TO_CI(ho->mppe, &p[2]);
> +-            if (newret == CONFACK) {
> +-                u_char opt_buf[CILEN_MPPE + MPPE_MAX_KEY_LEN];
> +-                int mtu;
> +-
> +-                BCOPY(p, opt_buf, CILEN_MPPE);
> +-                BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
> +-                      MPPE_MAX_KEY_LEN);
> +-                if (ccp_test(f->unit, opt_buf,
> +-                             CILEN_MPPE + MPPE_MAX_KEY_LEN, 1) <= 0) {
> +-                    /* This shouldn't happen, we've already tested it! */
> +-                    error("MPPE required, but kernel has no support.");
> +-                    lcp_close(f->unit, "MPPE required but not available");
> +-                    newret = CONFREJ;
> +-                    break;
>  +                goto check_mppe;
>  +            }
>  +        check_mppe_56_40:
> @@ -1182,9 +1209,8 @@
>  +                        (wo->mppc ? MPPE_MPPC : 0);
>  +                } else {
>  +                    ho->mppe = ho->mppe_stateless = 0;
> -                 }
> -             } else {
> --                /* Neither are set. */
> ++                }
> ++            } else {
>  +                /* MPPE is not compatible with other compression types */
>  +                if (wo->mppe) {
>  +                    ao->bsd_compress = 0;
> @@ -1192,32 +1218,7 @@
>  +                    ao->predictor_2 = 0;
>  +                    ao->deflate = 0;
>  +                    ao->lzs = 0;
> -+                }
> -+            }
> -+            if ((!ho->mppc || !ao->mppc) && !ho->mppe) {
> -+                p[2] = p2;
> -+                p[5] = p5;
> -                 newret = CONFREJ;
> -                 break;
> -             }
> -
> --            /* rebuild the opts */
> --            MPPE_OPTS_TO_CI(ho->mppe, &p[2]);
> --            if (newret == CONFACK) {
> --                u_char opt_buf[CILEN_MPPE + MPPE_MAX_KEY_LEN];
> --                int mtu;
> --
> --                BCOPY(p, opt_buf, CILEN_MPPE);
> --                BCOPY(mppe_send_key, &opt_buf[CILEN_MPPE],
> --                      MPPE_MAX_KEY_LEN);
> --                if (ccp_test(f->unit, opt_buf,
> --                             CILEN_MPPE + MPPE_MAX_KEY_LEN, 1) <= 0) {
> --                    /* This shouldn't happen, we've already tested it! */
> --                    error("MPPE required, but kernel has no support.");
> --                    lcp_close(f->unit, "MPPE required but not available");
> --                    newret = CONFREJ;
> --                    break;
> --                }
> +                 }
>  -                /*
>  -                 * We need to decrease the interface MTU by MPPE_PAD
>  -                 * because MPPE frames **grow**.  The kernel [must]
> @@ -1228,7 +1229,14 @@
>  -                    netif_set_mtu(f->unit, mtu - MPPE_PAD);
>  -                else
>  -                    newret = CONFREJ;
> --            }
> +             }
> ++            if ((!ho->mppc || !ao->mppc) && !ho->mppe) {
> ++                p[2] = p2;
> ++                p[5] = p5;
> ++                newret = CONFREJ;
> ++                break;
> ++            }
> ++
>  +            /*
>  +             * I have commented the code below because according to RFC1547
>  +             * MTU is only information for higher level protocols about
> @@ -1301,7 +1309,7 @@
>           case CI_DEFLATE:
>           case CI_DEFLATE_DRAFT:
>               if (!ao->deflate || clen != CILEN_DEFLATE
> -@@ -1340,12 +1832,6 @@
> +@@ -1344,12 +1833,6 @@
>       else
>           *lenp = retp - p0;
>       }
> @@ -1314,7 +1322,7 @@
>       return ret;
>   }
>
> -@@ -1367,24 +1853,35 @@
> +@@ -1371,24 +1854,35 @@
>       char *p = result;
>       char *q = result + sizeof(result); /* 1 past result */
>
> @@ -1366,7 +1374,7 @@
>       case CI_DEFLATE:
>       case CI_DEFLATE_DRAFT:
>       if (opt2 != NULL && opt2->deflate_size != opt->deflate_size)
> -@@ -1440,12 +1937,12 @@
> +@@ -1444,12 +1938,12 @@
>       } else if (ANY_COMPRESS(*ho))
>       notice("%s transmit compression enabled", method_name(ho, NULL));
>   #ifdef MPPE
> @@ -1381,7 +1389,7 @@
>   }
>
>   /*
> -@@ -1468,7 +1965,7 @@
> +@@ -1472,7 +1966,7 @@
>           lcp_close(f->unit, "MPPE disabled");
>       }
>       }
> @@ -1390,7 +1398,7 @@
>   }
>
>   /*
> -@@ -1528,24 +2025,28 @@
> +@@ -1532,24 +2026,28 @@
>   #ifdef MPPE
>           case CI_MPPE:
>               if (optlen >= CILEN_MPPE) {
> @@ -1431,7 +1439,7 @@
>           case CI_DEFLATE:
>           case CI_DEFLATE_DRAFT:
>               if (optlen >= CILEN_DEFLATE) {
> -@@ -1631,6 +2132,7 @@
> +@@ -1635,6 +2133,7 @@
>           error("Lost compression sync: disabling compression");
>           ccp_close(unit, "Lost compression sync");
>   #ifdef MPPE
> @@ -1439,7 +1447,7 @@
>           /*
>            * If we were doing MPPE, we must also take the link down.
>            */
> -@@ -1638,9 +2140,18 @@
> +@@ -1642,9 +2141,18 @@
>               error("Too many MPPE errors, closing LCP");
>               lcp_close(unit, "Too many MPPE errors");
>           }
> @@ -1459,7 +1467,7 @@
>            * Send a reset-request to reset the peer's compressor.
>            * We don't do that if we are still waiting for an
>            * acknowledgement to a previous reset-request.
> -@@ -1671,4 +2182,3 @@
> +@@ -1675,4 +2183,3 @@
>       } else
>       ccp_localstate[f->unit] &= ~RACK_PENDING;
>   }
> @@ -1490,7 +1498,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/chap_ms.c    2007-06-04 13:22:08.168613464 +0200
>  +++ ppp-2.4.3/pppd/chap_ms.c 2007-06-04 13:22:12.033025984 +0200
> -@@ -895,13 +895,17 @@
> +@@ -897,13 +897,17 @@
>       /*
>        * Disable undesirable encryption types.  Note that we don't ENABLE
>        * any encryption types, to avoid overriding manual configuration.
> @@ -1514,7 +1522,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/pppd.8       2007-06-04 13:22:08.175612400 +0200
>  +++ ppp-2.4.3/pppd/pppd.8    2007-06-04 13:22:12.034025832 +0200
> -@@ -622,9 +622,29 @@
> +@@ -627,9 +627,29 @@
>   Enables the use of PPP multilink; this is an alias for the `multilink'
>   option.  This option is currently only available under Linux.
>   .TP
> @@ -1547,7 +1555,7 @@
>   .TP
>   .B mpshortseq
>   Enables the use of short (12-bit) sequence numbers in multilink
> -@@ -757,17 +777,11 @@
> +@@ -767,17 +787,11 @@
>   Disables the use of PPP multilink.  This option is currently only
>   available under Linux.
>   .TP
> @@ -1569,7 +1577,7 @@
>   .TP
>   .B nompshortseq
>   Disables the use of short (12-bit) sequence numbers in the PPP
> -@@ -948,19 +962,6 @@
> +@@ -958,19 +972,6 @@
>   Require the peer to authenticate itself using CHAP [Challenge
>   Handshake Authentication Protocol] authentication.
>   .TP
> Index: package/ppp/patches/203-no_strip.patch
> ===================================================================
> --- package/ppp/patches/203-no_strip.patch    (revision 16973)
> +++ package/ppp/patches/203-no_strip.patch    (working copy)
> @@ -5,7 +5,7 @@
>  @@ -25,7 +25,7 @@
>
>   install: chat
> -     mkdir -p $(BINDIR)
> +     mkdir -p $(BINDIR) $(MANDIR)
>  -    $(INSTALL) -s -c chat $(BINDIR)
>  +    $(INSTALL) -c chat $(BINDIR)
>       $(INSTALL) -c -m 644 chat.8 $(MANDIR)
> @@ -24,7 +24,7 @@
>   MANPAGES += srp-entry.8
>   EXTRACLEAN += srp-entry.o
>   NEEDDES=y
> -@@ -202,7 +202,7 @@
> +@@ -200,7 +200,7 @@
>   install: pppd
>       mkdir -p $(BINDIR) $(MANDIR)
>       $(EXTRAINSTALL)
> Index: package/ppp/patches/107-debian_stripMSdomain.patch
> ===================================================================
> --- package/ppp/patches/107-debian_stripMSdomain.patch        (revision 16973)
> +++ package/ppp/patches/107-debian_stripMSdomain.patch        (working copy)
> @@ -19,7 +19,7 @@
>       { NULL }
>   };
>
> -@@ -338,6 +341,14 @@
> +@@ -335,6 +338,14 @@
>                       /* Null terminate and clean remote name. */
>                       slprintf(rname, sizeof(rname), "%.*v", len, name);
>                       name = rname;
> Index: package/ppp/patches/109-debian_demand.patch
> ===================================================================
> --- package/ppp/patches/109-debian_demand.patch       (revision 16973)
> +++ package/ppp/patches/109-debian_demand.patch       (working copy)
> @@ -143,7 +143,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/ipcp.c       2007-06-04 13:22:11.387124176 +0200
>  +++ ppp-2.4.3/pppd/ipcp.c    2007-06-04 13:22:11.614089672 +0200
> -@@ -1796,7 +1796,7 @@
> +@@ -1797,7 +1797,7 @@
>                   proxy_arp_set[f->unit] = 1;
>
>       }
> @@ -169,7 +169,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/pppd.h       2007-06-04 13:22:11.388124024 +0200
>  +++ ppp-2.4.3/pppd/pppd.h    2007-06-04 13:22:11.615089520 +0200
> -@@ -563,7 +563,7 @@
> +@@ -565,7 +565,7 @@
>   void demand_block __P((void));      /* set all NPs to queue up packets */
>   void demand_unblock __P((void)); /* set all NPs to pass packets */
>   void demand_discard __P((void)); /* set all NPs to discard packets */
> Index: package/ppp/patches/104-debian_fix_linkpidfile.patch
> ===================================================================
> --- package/ppp/patches/104-debian_fix_linkpidfile.patch      (revision 16973)
> +++ package/ppp/patches/104-debian_fix_linkpidfile.patch      (working copy)
> @@ -27,7 +27,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/main.c       2007-06-04 13:22:09.004486392 +0200
>  +++ ppp-2.4.3/pppd/main.c    2007-06-04 13:22:10.548251704 +0200
> -@@ -768,8 +768,7 @@
> +@@ -772,8 +772,7 @@
>       /* update pid files if they have been written already */
>       if (pidfilename[0])
>           create_pidfile(pid);
> Index: package/ppp/patches/207-ppp_reconnect.patch (deleted)
> ===================================================================
> Index: package/ppp/patches/210-lcp_mtu_max.patch
> ===================================================================
> --- package/ppp/patches/210-lcp_mtu_max.patch (revision 16973)
> +++ package/ppp/patches/210-lcp_mtu_max.patch (working copy)
> @@ -2,7 +2,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/lcp.c        2007-06-04 13:22:07.874658152 +0200
>  +++ ppp-2.4.3/pppd/lcp.c     2007-06-04 13:22:13.945735208 +0200
> -@@ -1891,12 +1891,12 @@
> +@@ -1904,12 +1904,12 @@
>        * the interface MTU is set to the lowest of that, the
>        * MTU we want to use, and our link MRU.
>        */
> Index: package/ppp/patches/310-precompiled_filter.patch
> ===================================================================
> --- package/ppp/patches/310-precompiled_filter.patch  (revision 16973)
> +++ package/ppp/patches/310-precompiled_filter.patch  (working copy)
> @@ -12,7 +12,7 @@
>   # Uncomment the next line to enable multilink PPP (enabled by default)
>   # Linux distributions: Please leave multilink ENABLED in your builds
>   # of pppd!
> -@@ -177,6 +180,14 @@
> +@@ -175,6 +178,14 @@
>   endif
>   endif
>
> @@ -27,46 +27,19 @@
>   ifdef HAVE_INET6
>        PPPDSRCS += ipv6cp.c eui64.c
>        HEADERS  += ipv6cp.h eui64.h
> -Index: ppp-2.4.3/pppd/demand.c
> -===================================================================
> ---- ppp-2.4.3.orig/pppd/demand.c     2007-06-04 13:22:11.613089824 +0200
> -+++ ppp-2.4.3/pppd/demand.c  2007-06-04 13:22:14.320678208 +0200
> -@@ -438,12 +438,14 @@
> -     return 0;
> -     proto = PPP_PROTOCOL(p);
> - #ifdef PPP_FILTER
> -+    *p = 1; /* set outbound for the filter rule */
> -     if (pass_filter.bf_len != 0
> -     && bpf_filter(pass_filter.bf_insns, p, len, len) == 0)
> -     return 0;
> -     if (active_filter.bf_len != 0
> -     && bpf_filter(active_filter.bf_insns, p, len, len) == 0)
> -     return 0;
> -+    *p = 0xff; /* restore original ppp header */
> - #endif
> -     for (i = 0; (protp = protocols[i]) != NULL; ++i) {
> -     if (protp->protocol < 0xC000 && (protp->protocol & ~0x8000) == proto) {
>  Index: ppp-2.4.3/pppd/options.c
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/options.c    2007-06-04 13:22:09.005486240 +0200
>  +++ ppp-2.4.3/pppd/options.c 2007-06-04 13:22:14.321678056 +0200
> -@@ -57,14 +57,7 @@
> +@@ -57,6 +57,7 @@
>
>   #ifdef PPP_FILTER
>   #include <pcap.h>
> --/*
> -- * DLT_PPP_WITH_DIRECTION is in current libpcap cvs, and should be in
> -- * libpcap-0.8.4.  Until that is released, use DLT_PPP - but that means
> -- * we lose the inbound and outbound qualifiers.
> -- */
> --#ifndef DLT_PPP_WITH_DIRECTION
> --#define DLT_PPP_WITH_DIRECTION      DLT_PPP
> --#endif
>  +#include <pcap-bpf.h>
> - #endif
> -
> - #include "pppd.h"
> -@@ -155,6 +148,13 @@
> + /*
> +  * There have been 3 or 4 different names for this in libpcap CVS, but
> +  * this seems to be what they have settled on...
> +@@ -160,6 +153,13 @@
>   static int loadplugin __P((char **));
>   #endif
>
> @@ -80,7 +53,7 @@
>   #ifdef PPP_FILTER
>   static int setpassfilter __P((char **));
>   static int setactivefilter __P((char **));
> -@@ -312,6 +312,14 @@
> +@@ -317,6 +317,14 @@
>         "set filter for active pkts", OPT_PRIO },
>   #endif
>
> @@ -95,7 +68,7 @@
>   #ifdef MAXOCTETS
>       { "maxoctets", o_int, &maxoctets,
>         "Set connection traffic limit",
> -@@ -1447,6 +1455,29 @@
> +@@ -1456,6 +1464,29 @@
>       return ok;
>   }
>
> @@ -125,24 +98,6 @@
>   #ifdef PPP_FILTER
>   /*
>    * setpassfilter - Set the pass filter for packets
> -@@ -1458,7 +1489,7 @@
> -     pcap_t *pc;
> -     int ret = 0;
> -
> --    pc = pcap_open_dead(DLT_PPP_WITH_DIRECTION, 65535);
> -+    pc = pcap_open_dead(DLT_PPP_PPPD, 65535);
> -     if (pcap_compile(pc, &pass_filter, *argv, 1, netmask) == -1) {
> -     option_error("error in pass-filter expression: %s\n",
> -                  pcap_geterr(pc));
> -@@ -1479,7 +1510,7 @@
> -     pcap_t *pc;
> -     int ret = 0;
> -
> --    pc = pcap_open_dead(DLT_PPP_WITH_DIRECTION, 65535);
> -+    pc = pcap_open_dead(DLT_PPP_PPPD, 65535);
> -     if (pcap_compile(pc, &active_filter, *argv, 1, netmask) == -1) {
> -     option_error("error in active-filter expression: %s\n",
> -                  pcap_geterr(pc));
>  Index: ppp-2.4.3/pppd/pcap_pcc.c
>  ===================================================================
>  --- /dev/null        1970-01-01 00:00:00.000000000 +0000
> Index: package/ppp/patches/108-debian_defaultroute.patch
> ===================================================================
> --- package/ppp/patches/108-debian_defaultroute.patch (revision 16973)
> +++ package/ppp/patches/108-debian_defaultroute.patch (working copy)
> @@ -25,10 +25,10 @@
>
>  -static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t));
>  +static void ipcp_clear_addrs __P((int, u_int32_t, u_int32_t, bool));
> - static void ipcp_script __P((char *));              /* Run an up/down 
> script */
> + static void ipcp_script __P((char *, int)); /* Run an up/down script */
>   static void ipcp_script_done __P((void *));
>
> -@@ -1659,7 +1669,12 @@
> +@@ -1660,7 +1670,12 @@
>       if (!sifnpmode(u, PPP_IP, NPMODE_QUEUE))
>       return 0;
>       if (wo->default_route)
> @@ -41,7 +41,7 @@
>           default_route_set[u] = 1;
>       if (wo->proxy_arp)
>       if (sifproxyarp(u, wo->hisaddr))
> -@@ -1741,7 +1756,8 @@
> +@@ -1742,7 +1757,8 @@
>        */
>       if (demand) {
>       if (go->ouraddr != wo->ouraddr || ho->hisaddr != wo->hisaddr) {
> @@ -51,7 +51,7 @@
>           if (go->ouraddr != wo->ouraddr) {
>               warn("Local IP address changed to %I", go->ouraddr);
>               script_setenv("OLDIPLOCAL", ip_ntoa(wo->ouraddr), 0);
> -@@ -1766,7 +1782,12 @@
> +@@ -1767,7 +1783,12 @@
>
>           /* assign a default route through the interface if required */
>           if (ipcp_wantoptions[f->unit].default_route)
> @@ -64,7 +64,7 @@
>                   default_route_set[f->unit] = 1;
>
>           /* Make a proxy ARP entry if requested. */
> -@@ -1813,7 +1834,12 @@
> +@@ -1817,7 +1838,12 @@
>
>       /* assign a default route through the interface if required */
>       if (ipcp_wantoptions[f->unit].default_route)
> @@ -77,7 +77,7 @@
>               default_route_set[f->unit] = 1;
>
>       /* Make a proxy ARP entry if requested. */
> -@@ -1890,7 +1916,7 @@
> +@@ -1894,7 +1920,7 @@
>       sifnpmode(f->unit, PPP_IP, NPMODE_DROP);
>       sifdown(f->unit);
>       ipcp_clear_addrs(f->unit, ipcp_gotoptions[f->unit].ouraddr,
> @@ -86,7 +86,7 @@
>       }
>
>       /* Execute the ip-down script */
> -@@ -1906,16 +1932,25 @@
> +@@ -1910,16 +1936,25 @@
>    * proxy arp entries, etc.
>    */
>   static void
> @@ -130,7 +130,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/pppd.h       2007-06-04 13:22:09.005486240 +0200
>  +++ ppp-2.4.3/pppd/pppd.h    2007-06-04 13:22:11.388124024 +0200
> -@@ -642,7 +642,11 @@
> +@@ -644,7 +644,11 @@
>   int  cif6addr __P((int, eui64_t, eui64_t));
>                               /* Remove an IPv6 address from i/f */
>   #endif
> @@ -149,9 +149,9 @@
>  @@ -206,6 +206,8 @@
>
>   static int  if_is_up;       /* Interface has been marked up */
> - static u_int32_t default_route_gateway;     /* Gateway for default route
> added */ -+static struct rtentry old_def_rt;       /* Old default route */
> -+static int       default_rt_repl_rest;  /* replace and restore old
> default rt */ + static int    have_default_route;     /* Gateway for default 
> route
> added */ ++static struct      rtentry old_def_rt;     /* Old default route */
> ++static int  default_rt_repl_rest;   /* replace and restore old default rt */
>   static u_int32_t proxy_arp_addr;    /* Addr for proxy arp entry added */
>   static char proxy_arp_dev[16];              /* Device for proxy arp entry */
>   static u_int32_t our_old_addr;              /* for detecting address 
> changes */
> @@ -165,7 +165,7 @@
>       SIN_ADDR(rt->rt_dst) = strtoul(cols[route_dest_col], NULL, 16);
>       SIN_ADDR(rt->rt_gateway) = strtoul(cols[route_gw_col], NULL, 16);
>       SIN_ADDR(rt->rt_genmask) = strtoul(cols[route_mask_col], NULL, 16);
> -@@ -1589,19 +1594,53 @@
> +@@ -1589,20 +1594,53 @@
>   /********************************************************************
>    *
>    * sifdefaultroute - assign a default route through the address given.
> @@ -176,11 +176,12 @@
>  -    struct rtentry rt;
>  -
>  -    if (defaultroute_exists(&rt) && strcmp(rt.rt_dev, ifname) != 0) {
> --    u_int32_t old_gateway = SIN_ADDR(rt.rt_gateway);
> --
> --    if (old_gateway != gateway)
> --        error("not replacing existing default route to %s [%I]",
> --              rt.rt_dev, old_gateway);
> +-    if (rt.rt_flags & RTF_GATEWAY)
> +-        error("not replacing existing default route via %I",
> +-              SIN_ADDR(rt.rt_gateway));
> +-    else
> +-        error("not replacing existing default route through %s",
> +-              rt.rt_dev);
>  -    return 0;
>  + *
>  + * If the global default_rt_repl_rest flag is set, then this function
> @@ -231,8 +232,8 @@
>  +    }
>       }
>
> -     memset (&rt, '\0', sizeof (rt));
> -@@ -1623,6 +1662,12 @@
> +     memset (&rt, 0, sizeof (rt));
> +@@ -1621,6 +1660,12 @@
>           error("default route ioctl(SIOCADDRT): %m");
>       return 0;
>       }
> @@ -243,9 +244,9 @@
>  +        return 0;
>  +        }
>
> -     default_route_gateway = gateway;
> +     have_default_route = 1;
>       return 1;
> -@@ -1658,6 +1703,16 @@
> +@@ -1654,6 +1699,16 @@
>           return 0;
>       }
>       }
> Index: package/ppp/patches/200-makefile.patch
> ===================================================================
> --- package/ppp/patches/200-makefile.patch    (revision 16973)
> +++ package/ppp/patches/200-makefile.patch    (working copy)
> @@ -12,14 +12,12 @@
>   # Uncomment the next line to enable multilink PPP (enabled by default)
>   # Linux distributions: Please leave multilink ENABLED in your builds
>   # of pppd!
> --HAVE_MULTILINK=y
> -+#HAVE_MULTILINK=y
> + HAVE_MULTILINK=y
>
>   # Uncomment the next line to enable the TDB database (enabled by
> default.) # If you enable multilink, then TDB is automatically enabled
> also. # Linux distributions: Please leave TDB ENABLED in your builds.
> --USE_TDB=y
> -+#USE_TDB=y
> + USE_TDB=y
>
>  -HAS_SHADOW=y
>  +#HAS_SHADOW=y
> @@ -36,19 +34,15 @@
>  -COMPILE_FLAGS= -DHAVE_PATHS_H -DIPX_CHANGE -DHAVE_MMAP
>  +COMPILE_FLAGS= -DHAVE_PATHS_H -DHAVE_MMAP
>
> - CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS)
> + CFLAGS= $(COPTS) $(COMPILE_FLAGS) $(INCLUDE_DIRS) '-DDESTDIR="@DESTDIR@"'
>
> -@@ -117,12 +117,12 @@
> +@@ -117,10 +117,10 @@
>   #LIBS     += -lshadow $(LIBS)
>   endif
>
>  -ifneq ($(wildcard /usr/include/crypt.h),)
>  +#ifneq ($(wildcard /usr/include/crypt.h),)
> - CFLAGS   += -DHAVE_CRYPT_H=1
> --endif
> --ifneq ($(wildcard /usr/lib/libcrypt.*),)
> -+#endif
> -+#ifneq ($(wildcard /usr/lib/libcrypt.*),)
> + CFLAGS  += -DHAVE_CRYPT_H=1
>   LIBS        += -lcrypt
>  -endif
>  +#endif
> Index: package/ppp/patches/102-debian_pppoe_multicast_pado.patch (deleted)
> ===================================================================
> Index: package/ppp/patches/205-pppoe_iface_name.patch (deleted)
> ===================================================================
> Index: package/ppp/patches/300-filter-pcap-includes-lib.patch
> ===================================================================
> --- package/ppp/patches/300-filter-pcap-includes-lib.patch    (revision 16973)
> +++ package/ppp/patches/300-filter-pcap-includes-lib.patch    (working copy)
> @@ -2,7 +2,7 @@
>  ===================================================================
>  --- ppp-2.4.3.orig/pppd/Makefile.linux       2007-06-04 13:22:12.463960472 
> +0200
>  +++ ppp-2.4.3/pppd/Makefile.linux    2007-06-04 13:22:14.133706632 +0200
> -@@ -172,8 +172,8 @@
> +@@ -170,8 +170,8 @@
>
>   ifdef FILTER
>   ifneq ($(wildcard /usr/include/pcap-bpf.h),)
> Index: package/ppp/Makefile
> ===================================================================
> --- package/ppp/Makefile      (revision 16973)
> +++ package/ppp/Makefile      (working copy)
> @@ -8,12 +8,12 @@
>  include $(TOPDIR)/rules.mk
>
>  PKG_NAME:=ppp
> -PKG_VERSION:=2.4.3
> +PKG_VERSION:=2.4.4
>  PKG_RELEASE:=11.1
>
>  PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
>  PKG_SOURCE_URL:=ftp://ftp.samba.org/pub/ppp/
> -PKG_MD5SUM:=848f6c3cafeb6074ffeb293c3af79b7c
> +PKG_MD5SUM:=183800762e266132218b204dfb428d29
>
>  PKG_BUILD_DEPENDS:=libpcap
>
>
>
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/mailman/listinfo/openwrt-devel



-- 
Best regards, Florian Fainelli
Email: flor...@openwrt.org
Web: http://openwrt.org
IRC: [florian] on irc.freenode.net
-------------------------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to