mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 05:36:47 +00:00
pptp: use /sbin/ip
Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
parent
32dcdfd035
commit
051d9b0a6b
36
packages/network/pptp/patches/pptp-1.7.2-use-sbin-ip.patch
Normal file
36
packages/network/pptp/patches/pptp-1.7.2-use-sbin-ip.patch
Normal file
@ -0,0 +1,36 @@
|
||||
commit aa1536de73a383ca64f2bd325ec2844679a269c2
|
||||
Author: Stefan Saraev <stefan@saraev.ca>
|
||||
Date: Sat Oct 12 18:08:59 2013 +0300
|
||||
|
||||
use /sbin/ip for routing
|
||||
|
||||
diff --git a/routing.c b/routing.c
|
||||
index ab20a03..7fb4277 100644
|
||||
--- a/routing.c
|
||||
+++ b/routing.c
|
||||
@@ -55,7 +55,7 @@ regardless (not yet implemented).
|
||||
|
||||
void routing_init(char *ip) {
|
||||
char buf[256];
|
||||
- snprintf(buf, 255, "/bin/ip route get %s", ip);
|
||||
+ snprintf(buf, 255, "/sbin/ip route get %s", ip);
|
||||
FILE *p = popen(buf, "r");
|
||||
fgets(buf, 255, p);
|
||||
/* TODO: check for failure of fgets */
|
||||
@@ -66,14 +66,14 @@ void routing_init(char *ip) {
|
||||
|
||||
void routing_start() {
|
||||
char buf[256];
|
||||
- snprintf(buf, 255, "/bin/ip route replace %s", route);
|
||||
+ snprintf(buf, 255, "/sbin/ip route replace %s", route);
|
||||
FILE *p = popen(buf, "r");
|
||||
pclose(p);
|
||||
}
|
||||
|
||||
void routing_end() {
|
||||
char buf[256];
|
||||
- snprintf(buf, 255, "/bin/ip route delete %s", route);
|
||||
+ snprintf(buf, 255, "/sbin/ip route delete %s", route);
|
||||
FILE *p = popen(buf, "r");
|
||||
pclose(p);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user