Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

Update ppp with ubuntu patch
Thank you for your donation

Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
Update ppp with ubuntu patch
11th Nov, 2013, 08:47 PM
Post: #1
traxtopel Offline
Registered
Posts: 1
Joined: Nov 2013
Reputation: 0
Update ppp with ubuntu patch
How do I request that the current ppp package gets updated with an additional ubuntu patch.

Current ppp package when used in conjunction with a pptp vpn connection fails.

When compiled with the following patch, it works perfectly.

From 053fa32a9ccd0ac1fbbda50db7aff7fdae18652a Mon Sep 17 00:00:00 2001
From: Alexander Sack <asac@jwsdot.com>
Date: Thu, 18 Dec 2008 05:33:13 +0100
Subject: [PATCH] port: ppp-2.4.4rel/debian/patches/load_ppp_generic_if_needed

---
pppd/sys-linux.c | 41 +++++++++++++++++++++++++++++++++++++++++
1 files changed, 41 insertions(+), 0 deletions(-)

--- a/pppd/sys-linux.c
+++ b/pppd/sys-linux.c
@@ -92,6 +92,7 @@
#include <ctype.h>
#include <termios.h>
#include <unistd.h>
+#include <wait.h>

/* This is in netdevice.h. However, this compile will fail miserably if
you attempt to include netdevice.h because it has so many references
@@ -2104,6 +2105,46 @@

if (kernel_version >= KVERSION(2,3,13)) {
error("Couldn't open the /dev/ppp device: %m");
+ char modprobePath[PATH_MAX] = "";
+ int status, p, count;
+ pid_t pid;
+
+ fd = open("/proc/sys/kernel/modprobe", O_RDONLY);
+ if (fd >= 0) {
+ int count = read(fd, modprobePath, PATH_MAX - 1);
+ if (count < 1)
+ modprobePath[0] = 0;
+ else if (modprobePath[count - 1] == '\n')
+ modprobePath[count - 1] = 0;
+ close(fd);
+ }
+
+ if (modprobePath[0] == 0)
+ strcpy(modprobePath, "/sbin/modprobe");
+
+ switch (pid = fork()) {
+ case 0: /* child */
+ setenv("PATH", "/sbin", 1);
+ status = execl(modprobePath, "modprobe", "ppp_generic", NULL);
+ case -1: /* couldn't fork */
+ errno = ENOENT;
+ default: /* parent */
+ do
+ p = waitpid(pid, &status, 0);
+ while (p == -1 && count++ < 4);
+
+ sleep (5);
+
+ }
+
+ if ((fd = open("/dev/ppp", O_RDWR)) >= 0) {
+ new_style_driver = 1;
+ driver_version = 2;
+ driver_modification = 4;
+ driver_patch = 0;
+ close(fd);
+ return 1;
+ }
if (errno == ENOENT)
no_ppp_msg =
"You need to create the /dev/ppp device node by\n"
Find all posts by this user
Quote this message in a reply
12th Nov, 2013, 05:58 AM
Post: #2
f1vefour Offline
Administrator
******
Posts: 1,342
Joined: Mar 2013
Reputation: 58
RE: Update ppp with ubuntu patch
Open an issue on Github

Please read rules and do a search before you post! | FAQs | How to post log file? | Can't find an answer? Contact us.
Visit this user's website Find all posts by this user
Quote this message in a reply
1st Dec, 2013, 09:48 AM
Post: #3
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: Update ppp with ubuntu patch
@traxtopel

until this patch gets into upstream (if ever), providing custom ppp package would mean taking care of each upstream (debian/raspbian) update and recompiling (maybe even updating the patch itself).

wouldn't be better to just document this here / github for XBian with an proposed solution to put "ppp_generic" into /etc/modules for those using pptp vpn setup?

thanks for posting this anyhow.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Post Reply 


  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 9th May, 2025, 07:17 PM Powered By MyBB, © 2002-2025 MyBB Group.