Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 31200 Details for
Bug 50765
baselayout-1.9.1: patch for creating tunnels (GRE/IPIP) from conf.d/net settings
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
patch against baselayout-1.8.8+iproute2
baselayout-iproute2-tunnels.diff (text/plain), 2.10 KB, created by
George Barbarosie
on 2004-05-11 10:30:27 UTC
(
hide
)
Description:
patch against baselayout-1.8.8+iproute2
Filename:
MIME Type:
Creator:
George Barbarosie
Created:
2004-05-11 10:30:27 UTC
Size:
2.10 KB
patch
obsolete
>diff -ur rc-scripts-1.4.6-iproute2/etc/conf.d/net rc-scripts-1.4.6-iproute2-tunnel/etc/conf.d/net >--- rc-scripts-1.4.6-iproute2/etc/conf.d/net 2004-05-11 20:03:10.533014833 +0300 >+++ rc-scripts-1.4.6-iproute2-tunnel/etc/conf.d/net 2004-05-11 20:13:41.733186147 +0300 >@@ -68,6 +68,16 @@ > # "default via 192.168.0.1" > # ) > >+# The following will set up a GRE tunnel as interface vpn0. The interface is >+# configured separately using ipaddr_vpn0 and iproute_vpn0 >+# iptunnel_vpn0="mode gre remote 207.170.82.1 key=0xffffff ttl=255" >+# ipaddr_vpn0=( >+# "192.168.0.2 peer 192.168.1.1" >+# ) >+# iproute_vpn0=( >+# "192.168.1.0/24 via 192.168.1.1" >+# ) >+ > # For DHCP set ipaddr_eth? to "dhcp" > # For passing options to dhcpcd use dhcpcd_eth? > # ipaddr_eth0=("dhcp") >diff -ur rc-scripts-1.4.6-iproute2/init.d/net.eth0 rc-scripts-1.4.6-iproute2-tunnel/init.d/net.eth0 >--- rc-scripts-1.4.6-iproute2/init.d/net.eth0 2004-05-11 20:03:10.535014505 +0300 >+++ rc-scripts-1.4.6-iproute2-tunnel/init.d/net.eth0 2004-05-11 20:27:28.022139457 +0300 >@@ -55,6 +55,7 @@ > # iproute2 style config vars > eval ipaddr_IFACE=( \"\$\{ipaddr_$iface\[@\]\}\" ) > eval iproute_IFACE=( \"\$\{iproute_$iface\[@\]\}\" ) >+ eval iptunnel_IFACE=\"\$\{iptunnel_${iface}\}\" > > # BACKWARD COMPATIBILITY: populate the ifconfig_IFACE array > # if iface_IFACE is set (fex. iface_eth0 instead of ifconfig_eth0) >@@ -85,6 +86,13 @@ > local IFACE=${1} i x > checkconfig || return 1 > >+ # Do ip tunnel if present in configuration >+ if [[ -z "$(/sbin/ip tunnel show ${1})" && -n ${iptunnel_IFACE} ]]; then >+ ebegin "Configuring tunnel ${IFACE}" >+ /sbin/ip tunnel add ${IFACE} ${tunnel_IFACE} &>${devnull} >+ eend $? || return $? >+ fi >+ > # Do dhcp if it is enabled in config > if [[ ${ifconfig_IFACE} = dhcp ]] || [[ ${ipaddr_IFACE} = dhcp ]]; then > # Check that eth0 was not brought up by the kernel ... >@@ -250,6 +258,13 @@ > /sbin/ip link set dev ${IFACE} down &>${devnull} > eend $? > fi >+ >+ # Try to destroy tunnel >+ if [[ -n "$(/sbin/ip tunnel show ${IFACE})" ]]; then >+ ebegin "Destroying tunnel ${IFACE}" >+ /sbin/ip tunnel del ${IFACE} &>${devnull} >+ eend $? >+ fi > return 0 > } >
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 50765
:
31190
|
31200
|
31245
|
31246