ppp: Update to version 2.4.9
[openwrt/openwrt.git] / package / network / services / ppp / patches / 321-multilink_support_custom_iface_names.patch
index 75c803650fa06c1f1d78fe2272d560998e1df1f0..0c4d7ea9d6cd8fa1abb506df51a35e9359ed2d47 100644 (file)
@@ -16,17 +16,17 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
  
  #include "pppd.h"
  #include "fsm.h"
-@@ -56,7 +57,8 @@ static void iterate_bundle_links __P((vo
+@@ -56,7 +57,8 @@ static void iterate_bundle_links(void (*
  
- static int get_default_epdisc __P((struct epdisc *));
- static int parse_num __P((char *str, const char *key, int *valp));
--static int owns_unit __P((TDB_DATA pid, int unit));
-+static int parse_str __P((char *str, const char *key, char *buf, int buflen));
-+static int owns_link __P((TDB_DATA pid, char *ifname));
+ static int get_default_epdisc(struct epdisc *);
+ static int parse_num(char *str, const char *key, int *valp);
+-static int owns_unit(TDB_DATA pid, int unit);
++static int parse_str(char *str, const char *key, char *buf, int buflen);
++static int owns_link(TDB_DATA pid, char *ifname);
  
  #define set_ip_epdisc(ep, addr) do {  \
        ep->length = 4;                 \
-@@ -197,35 +199,38 @@ mp_join_bundle()
+@@ -197,35 +199,38 @@ mp_join_bundle(void)
        key.dptr = bundle_id;
        key.dsize = p - bundle_id;
        pid = tdb_fetch(pppdb, key);
@@ -73,16 +73,12 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
        }
  
        /* we have to make a new bundle */
-@@ -408,22 +413,45 @@ parse_num(str, key, valp)
+@@ -405,20 +410,39 @@ parse_num(char *str, const char *key, in
        return 0;
  }
  
 +static int
-+parse_str(str, key, buf, buflen)
-+     char *str;
-+     const char *key;
-+     char *buf;
-+     int buflen;
++parse_str(char *str, const char *key, char *buf, int buflen)
 +{
 +      char *p, *endp;
 +      int i;
@@ -103,11 +99,8 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
 + * Check whether the pppd identified by `key' still owns ppp link `ifname'.
   */
  static int
--owns_unit(key, unit)
-+owns_link(key, ifname)
-      TDB_DATA key;
--     int unit;
-+     char *ifname;
+-owns_unit(TDB_DATA key, int unit)
++owns_link(TDB_DATA key, char *ifname)
  {
 -      char ifkey[32];
 +      char ifkey[7 + IFNAMSIZ];
@@ -126,7 +119,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
                        && memcmp(vd.dptr, key.dptr, vd.dsize) == 0;
 --- a/pppd/sys-linux.c
 +++ b/pppd/sys-linux.c
-@@ -700,6 +700,16 @@ void cfg_bundle(int mrru, int mtru, int
+@@ -706,6 +706,16 @@ void cfg_bundle(int mrru, int mtru, int
        add_fd(ppp_dev_fd);
  }
  
@@ -143,7 +136,7 @@ Signed-off-by: George Kashperko <george@znau.edu.ua>
  /*
   * make_new_bundle - create a new PPP unit (i.e. a bundle)
   * and connect our channel to it.  This should only get called
-@@ -718,6 +728,8 @@ void make_new_bundle(int mrru, int mtru,
+@@ -724,6 +734,8 @@ void make_new_bundle(int mrru, int mtru,
  
        /* set the mrru and flags */
        cfg_bundle(mrru, mtru, rssn, tssn);