aboutsummaryrefslogtreecommitdiffstats
path: root/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
diff options
context:
space:
mode:
authorHauke Mehrtens <hauke@hauke-m.de>2021-01-03 03:29:02 +0100
committerHauke Mehrtens <hauke@hauke-m.de>2021-02-24 00:30:20 +0100
commit030bc39c350d301d3cbca4725e845a752c359c5f (patch)
tree8c8d755375f67586ca56fc5b253ebc71af55fee4 /package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
parent12a80e44b914a00fa39daae5474b3964f246ddc3 (diff)
downloadupstream-030bc39c350d301d3cbca4725e845a752c359c5f.tar.gz
upstream-030bc39c350d301d3cbca4725e845a752c359c5f.tar.bz2
upstream-030bc39c350d301d3cbca4725e845a752c359c5f.zip
ppp: Update to version 2.4.9
Upstream integrated multiple patches from Distributions and did other changes: * rp-pppoe.so was renamed to pppoe.so * Converted to ANSI C The following patches were applied upstream: * 100-debian_ip-ip_option.patch * 101-debian_close_dev_ppp.patch * 103-debian_fix_link_pidfile.patch * 106-debian_stripMSdomain.patch * 107-debian_pppoatm_wildcard.patch * 110-debian_defaultroute.patch * 202-no_strip.patch Compilation with musl libc was fixed upstream so 140-pppoe_compile_fix.patch is not needed any more Parts of the 203-opt_flags.patch patch were applied in a different way upstream. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Diffstat (limited to 'package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch')
-rw-r--r--package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch33
1 files changed, 13 insertions, 20 deletions
diff --git a/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch b/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
index 75c803650f..0c4d7ea9d6 100644
--- a/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
+++ b/package/network/services/ppp/patches/321-multilink_support_custom_iface_names.patch
@@ -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);