Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 602430 Details for
Bug 704722
net/pppd.sh with >=net-dialup/ppp-2.4.8: incompatible option name: defaultroute-metric
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
netifrc-0.6.1-pppd-2.4.8-defaultroute-metric.patch
netifrc-0.6.1-pppd-2.4.8-defaultroute-metric.patch (text/plain), 2.22 KB, created by
Lars Wendler (Polynomial-C) (RETIRED)
on 2020-01-03 21:07:07 UTC
(
hide
)
Description:
netifrc-0.6.1-pppd-2.4.8-defaultroute-metric.patch
Filename:
MIME Type:
Creator:
Lars Wendler (Polynomial-C) (RETIRED)
Created:
2020-01-03 21:07:07 UTC
Size:
2.22 KB
patch
obsolete
>From 89952e2f6e824e73b2df0b8cd5e4484ff87e5412 Mon Sep 17 00:00:00 2001 >From: Lars Wendler <polynomial-c@gentoo.org> >Date: Fri, 3 Jan 2020 21:30:28 +0100 >Subject: [PATCH] pppd.sh: ppp-2.4.8 "introduced defaultroute-metric" option > >That option name differs from the one we patched into previous pppd releases >so check if we are on >=2.4.8 version and use the correct option name >accordingly > >Signed-off-by: Lars Wendler <polynomial-c@gentoo.org> >--- > net/pppd.sh | 34 ++++++++++++++++++++++++++++++++-- > 1 file changed, 32 insertions(+), 2 deletions(-) > >diff --git a/net/pppd.sh b/net/pppd.sh >index 6ca1396..796722e 100644 >--- a/net/pppd.sh >+++ b/net/pppd.sh >@@ -21,6 +21,32 @@ requote() > printf "'%s' " "$@" > } > >+pppd_is_ge_248() >+{ >+ local ver_str="$(/usr/sbin/pppd --version 2>&1 | grep -o '[[:digit:]\.]\+')" >+ local maj_ver="$(echo ${ver_str} | cut -d . -f 1)" >+ local min_ver="$(echo ${ver_str} | cut -d . -f 2)" >+ local patch_ver="$(echo ${ver_str} | cut -d . -f 3)" >+ >+ if [ "${maj_ver}" -gt 2 ] ; then >+ return 0 >+ elif [ "${maj_ver}" -eq 2 ] ; then >+ if [ "${min_ver}" -gt 4 ] ; then >+ return 0 >+ elif [ "${min_ver}" -eq 4 ] ; then >+ if [ "${patch_ver}" -ge 8 ] ; then >+ return 0 >+ else >+ return 1 >+ fi >+ else >+ return 1 >+ fi >+ else >+ return 1 >+ fi >+} >+ > pppd_pre_start() > { > # Interface has to be called ppp >@@ -39,7 +65,10 @@ pppd_pre_start() > return 0 > fi > >- local link= i= unit="${IFACE#ppp}" opts= >+ local link= i= unit="${IFACE#ppp}" opts= routemetric=defaultmetric >+ >+ # https://github.com/paulusmack/ppp/commit/35e5a569c988b1ff865b02a24d9a727a00db4da9 >+ pppd_is_ge_248 && routemetric=defaultroute-metric > > # PPP requires a link to communicate over - normally a serial port > # PPPoE communicates over Ethernet >@@ -76,6 +105,7 @@ pppd_pre_start() > return 1 > ;; > defaultmetric) hasdefaultmetric=true;; >+ defaultroute-metric) hasdefaultmetric=true;; > mtu) hasmtu=true;; > mru) hasmru=true;; > maxfail) hasmaxfail=true;; >@@ -98,7 +128,7 @@ pppd_pre_start() > local m= > eval m=\$metric_${IFVAR} > [ -z "${m}" ] && : $(( m = metric + $(_ifindex) )) >- opts="${opts} defaultmetric ${m}" >+ opts="${opts} ${routemetric} ${m}" > fi > if [ -n "${mtu}" ]; then > ${hasmtu} || opts="${opts} mtu ${mtu}" >-- >2.24.1 >
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 704722
:
602430
|
602432