summaryrefslogtreecommitdiffstats
path: root/package/network/services/ppp/patches/400-simplify_kernel_checks.patch
diff options
context:
space:
mode:
authorChristian Marangi <ansuelsmth@gmail.com>2023-06-13 23:19:02 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-06-14 05:40:26 +0200
commit8c1bd9b6a5056260393024a8d666f9367fac4885 (patch)
tree4d2478f2f8a9ceed61c3779c4739e7a4e54627a8 /package/network/services/ppp/patches/400-simplify_kernel_checks.patch
parent244328b19c3943bb145b72f0d85062f535e56fbd (diff)
downloadopenwrt-8c1bd9b6a5056260393024a8d666f9367fac4885.tar.gz
openwrt-8c1bd9b6a5056260393024a8d666f9367fac4885.tar.bz2
openwrt-8c1bd9b6a5056260393024a8d666f9367fac4885.zip
ppp: backport patches improving ppp interface creation
Backport patches improving ppp interface creation. As a side effect this also fix a bug from using netdev trigger that suffer from LED state wrongly set due to using old ioctl for ppp creation. Tested-by: Csaba Sipos <metro4@freemail.hu> Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
Diffstat (limited to 'package/network/services/ppp/patches/400-simplify_kernel_checks.patch')
-rw-r--r--package/network/services/ppp/patches/400-simplify_kernel_checks.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/package/network/services/ppp/patches/400-simplify_kernel_checks.patch b/package/network/services/ppp/patches/400-simplify_kernel_checks.patch
index 3c72048362..9d0ea9a0b8 100644
--- a/package/network/services/ppp/patches/400-simplify_kernel_checks.patch
+++ b/package/network/services/ppp/patches/400-simplify_kernel_checks.patch
@@ -10,7 +10,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
-@@ -206,7 +206,7 @@ static int driver_is_old = 0;
+@@ -235,7 +235,7 @@ static int driver_is_old = 0;
static int restore_term = 0; /* 1 => we've munged the terminal */
static struct termios inittermios; /* Initial TTY termios */
@@ -19,7 +19,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
static char loop_name[20];
static unsigned char inbuf[512]; /* buffer for chars read from loopback */
-@@ -225,8 +225,8 @@ static int looped; /* 1 if using loop
+@@ -254,8 +254,8 @@ static int looped; /* 1 if using loop
static int link_mtu; /* mtu for the link (not bundle) */
static struct utsname utsname; /* for the kernel version */
@@ -29,7 +29,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
#define MAX_IFS 100
-@@ -1455,11 +1455,12 @@ int ccp_fatal_error (int unit)
+@@ -1933,11 +1933,12 @@ int ccp_fatal_error (int unit)
*
* path_to_procfs - find the path to the proc file system mount point
*/
@@ -44,7 +44,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
struct mntent *mntent;
FILE *fp;
-@@ -1481,6 +1482,7 @@ static char *path_to_procfs(const char *
+@@ -1959,6 +1960,7 @@ static char *path_to_procfs(const char *
fclose (fp);
}
}
@@ -52,7 +52,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
strlcpy(proc_path + proc_path_len, tail,
sizeof(proc_path) - proc_path_len);
-@@ -2365,15 +2367,19 @@ int ppp_available(void)
+@@ -2843,15 +2845,19 @@ int ppp_available(void)
int my_version, my_modification, my_patch;
int osmaj, osmin, ospatch;
@@ -72,7 +72,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
/* XXX should get from driver */
driver_version = 2;
-@@ -2433,6 +2439,7 @@ int ppp_available(void)
+@@ -2911,6 +2917,7 @@ int ppp_available(void)
if (ok && ((ifr.ifr_hwaddr.sa_family & ~0xFF) != ARPHRD_PPP))
ok = 0;
@@ -80,7 +80,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
/*
* This is the PPP device. Validate the version of the driver at this
-@@ -3106,6 +3113,7 @@ get_pty(int *master_fdp, int *slave_fdp,
+@@ -3592,6 +3599,7 @@ get_pty(int *master_fdp, int *slave_fdp,
}
#endif /* TIOCGPTN */
@@ -88,7 +88,7 @@ Signed-off-by: Jo-Philipp Wich <jo@mein.io>
if (sfd < 0) {
/* the old way - scan through the pty name space */
for (i = 0; i < 64; ++i) {
-@@ -3124,6 +3132,7 @@ get_pty(int *master_fdp, int *slave_fdp,
+@@ -3610,6 +3618,7 @@ get_pty(int *master_fdp, int *slave_fdp,
}
}
}