Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 504454 Details for
Bug 637394
net-misc/netifrc - add support for route types without dev option (iproute2)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
netifrc-1.patch
netifrc-1.patch (text/plain), 2.17 KB, created by
Alexander Zubkov
on 2017-11-15 20:02:14 UTC
(
hide
)
Description:
netifrc-1.patch
Filename:
MIME Type:
Creator:
Alexander Zubkov
Created:
2017-11-15 20:02:14 UTC
Size:
2.17 KB
patch
obsolete
>diff --git a/net/iproute2.sh b/net/iproute2.sh >index 7dea195..b7152d9 100644 >--- a/net/iproute2.sh >+++ b/net/iproute2.sh >@@ -227,13 +227,13 @@ _add_route() > set -- "${one}" "${two}" via "$@" > fi > >- local cmd= cmd_nometric= have_metric=false >+ local cmd_add= cmd_show= have_metric=false > while [ -n "$1" ]; do > case "$1" in >- metric) metric=$2 ; cmd="${cmd} metric $2" ; shift ; have_metric=true ;; >- netmask) x="/$(_netmask2cidr "$2")" ; cmd="${cmd}${x}" ; cmd_nometric="${cmd}${x}" ; shift;; >+ metric) metric=$2 ; cmd_add="${cmd_add} metric $2" ; shift ; have_metric=true ;; >+ netmask) x="/$(_netmask2cidr "$2")" ; cmd_add="${cmd_add}${x}" ; cmd_show="${cmd_show}${x}" ; shift;; > -host|-net);; >- *) cmd="${cmd} ${1}" ; cmd_nometric="${cmd_nometric} ${1}" ;; >+ *) cmd_add="${cmd_add} ${1}" ; cmd_show="${cmd_show} ${1}" ;; > esac > shift > done >@@ -241,18 +241,18 @@ _add_route() > # We cannot use a metric if we're using a nexthop > if ! ${have_metric} && \ > [ -n "${metric}" -a \ >- "${cmd##* nexthop }" = "$cmd" ] >+ "${cmd_add##* nexthop }" = "${cmd_add}" ] > then >- cmd="${cmd} metric ${metric}" >+ cmd_add="${cmd_add} metric ${metric}" > fi > > # Check for route already existing: >- ip ${family} route show ${cmd_nometric} dev "${IFACE}" 2>/dev/null | \ >- fgrep -sq "${cmd%% *}" >+ ip ${family} route show ${cmd_show} dev "${IFACE}" 2>/dev/null | \ >+ fgrep -sq "${cmd_add%% *}" > route_already_exists=$? > >- veinfo ip ${family} route append ${cmd} dev "${IFACE}" >- ip ${family} route append ${cmd} dev "${IFACE}" >+ veinfo ip ${family} route append ${cmd_add} dev "${IFACE}" >+ ip ${family} route append ${cmd_add} dev "${IFACE}" > rc=$? > # Check return code in some cases > if [ $rc -ne 0 ]; then >@@ -267,8 +267,8 @@ _add_route() > error|fatal) msgfunc=eerror rc=1;; > *) msgfunc=eerror rc=1 ; eerror "Unknown error behavior: $eh_behavior" ;; > esac >- eval $msgfunc "Route '$cmd_nometric' already existed:" >- eval $msgfunc \"$(ip $family route show ${cmd_nometric} dev "${IFACE}" 2>&1)\" >+ eval $msgfunc "Route '$cmd_show' already existed:" >+ eval $msgfunc \"$(ip $family route show ${cmd_show} dev "${IFACE}" 2>&1)\" > else > : # TODO: Handle other errors > fi
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 637394
:
504106
|
504454
|
504470
|
504532
|
505050