Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 100260 Details for
Bug 152522
Add support for ip rules to the iproute2 network init script
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to add support for ip rules to the iproute2 init script
iproute2.patch (text/plain), 1.12 KB, created by
Christian Schmidt
on 2006-10-23 04:17:49 UTC
(
hide
)
Description:
Patch to add support for ip rules to the iproute2 init script
Filename:
MIME Type:
Creator:
Christian Schmidt
Created:
2006-10-23 04:17:49 UTC
Size:
1.12 KB
patch
obsolete
>--- iproute2.old.sh 2006-10-23 12:11:29.000000000 +0200 >+++ iproute2.sh 2006-10-23 12:19:43.000000000 +0200 >@@ -285,6 +285,9 @@ > local -a routes=( "${!x}" ) > local metric="metric_${ifvar}" > >+ x="rules_${ifvar}[@]" >+ local -a rules=( "${!x}" ) >+ > # Test for old style ipaddr variable > if [[ -z ${routes} ]] ; then > t="iproute_${ifvar}[@]" >@@ -323,6 +326,19 @@ > eoutdent > fi > >+ # Set rules with ip rule >+ if [[ -n ${rules} ]] ; then >+ einfo "Adding rules" >+ eindent >+ for x in "${rules[@]}"; do >+ ebegin "${x}" >+ # explicitly DON'T add the "dev ${iface}" as it can break rules >+ ip rule add ${x} >+ eend $? >+ done >+ eoutdent >+ fi >+ > # Flush the route cache > ip route flush cache dev "${iface}" > >@@ -335,6 +351,21 @@ > > iproute2_exists "${iface}" || return > >+ # Delete rules - they don't disappear on iface shutdown >+ local x="rules_${iface}[@]" >+ local -a rules=( "${!x}" ) >+ >+ if [[ -n ${rules} ]] ; then >+ einfo "Removing rules" >+ eindent >+ for x in "${rules[@]}"; do >+ ebegin "${x}" >+ ip rule del ${x} >+ eend $? >+ done >+ eoutdent >+ fi >+ > # Flush the route cache > ip route flush cache dev "${iface}" > }
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 152522
: 100260 |
100261