Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 507778 Details for
Bug 621662
net-dialup/pptpclient: >=sys-apps/iproute2-4.10.0 breaks routing
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Discard uid part of iproute2 ip route get
pptpclient-discard-uid.patch (text/plain), 863 bytes, created by
MarisN
on 2017-12-02 21:11:41 UTC
(
hide
)
Description:
Discard uid part of iproute2 ip route get
Filename:
MIME Type:
Creator:
MarisN
Created:
2017-12-02 21:11:41 UTC
Size:
863 bytes
patch
obsolete
>diff --git a/routing.c b/routing.c >index 4141886..8bbc628 100644 >--- a/routing.c >+++ b/routing.c >@@ -112,13 +112,24 @@ void routing_init(char *ip) { > #endif /* Solaris */ > #if defined(__linux) > char buf[256]; >+ char tbuf[256]; >+ const char * uidStart; > FILE *p; > > snprintf(buf, 255, "%s route get %s", IP_BINARY, ip); > p = popen(buf, "r"); > fgets(buf, 255, p); > /* TODO: check for failure of fgets */ >- route = strdup(buf); >+ /* Starting with iproute2 4.10.0, call to 'ip route get' will contain uid value. >+ * Still uid should not be used in other calls (i.e. replace, delete). */ >+ uidStart = strstr(buf, " uid"); >+ if (uidStart) { >+ snprintf(tbuf, uidStart - buf + 1, "%s", buf); >+ route = strdup(tbuf); >+ } >+ else { >+ route = strdup(buf); >+ } > pclose(p); > /* TODO: check for failure of command */ > #endif /* __linux__ */
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 621662
: 507778