ALT Linux Bugzilla
– Attachment 5623 Details for
Bug 27931
Missed support for IPv6 on VENET interface for the etcnet-based VEs
New bug
|
Search
|
[?]
|
Help
Register
|
Log In
[x]
|
Forgot Password
Login:
[x]
|
EN
|
RU
[patch]
Patch to add IPv6 support
vzctl-etcnet-ipv6_support.patch (text/plain), 2.54 KB, created by
Nikolay A. Fetisov
on 2012-11-06 15:45:34 MSK
(
hide
)
Description:
Patch to add IPv6 support
Filename:
MIME Type:
Creator:
Nikolay A. Fetisov
Created:
2012-11-06 15:45:34 MSK
Size:
2.54 KB
patch
obsolete
>Adding IPv6 support on VENET interface for the etcnet-based VEs > >--- etc/dists/scripts/etcnet-add_ip.sh >+++ etc/dists/scripts/etcnet-add_ip.sh >@@ -58,6 +58,25 @@ destroy_venet_config() > error "Cannot destroy $dir" ${VZ_FS_NO_DISK_SPACE} > } > >+del_ipv6_conf() >+{ >+ local dir="$1"; shift >+ >+ if [ -f "$dir/ipv6address" ]; then >+ rm -f "$dir/ipv6address" || >+ error "Cannot remove $dir/ipv6address" ${VZ_FS_NO_DISK_SPACE} >+ fi >+ >+ if [ -f "$dir/ipv6route" ]; then >+ rm -f "$dir/ipv6route" || >+ error "Cannot remove $dir/ipv6route" ${VZ_FS_NO_DISK_SPACE} >+ fi >+ >+ del_param ".tmp/$VENET_DEV/options" "CONFIG_IPV6=yes" >+ >+} >+ >+ > setup_network() > { > # Purge old venet0 interface settings >@@ -74,6 +93,7 @@ setup_network() > echo '127.0.0.1 localhost.localdomain localhost' >"$HOSTFILE" > } > >+ > create_alias() > { > local ip="$1"; shift >@@ -84,6 +104,24 @@ create_alias() > error "Cannot create .tmp/$VENET_DEV/ipv4address" ${VZ_FS_NO_DISK_SPACE} > } > >+add_ip6() { >+ local ip="$1"; shift >+ local mask="$1"; shift >+ >+ [ "${IPV6}" != "yes" ] && return >+ >+ if ! grep -qw "$ip" ".tmp/$VENET_DEV/ipv6address" 2>/dev/null; then >+ echo "2000::/3 dev $VENET_DEV" > ".tmp/$VENET_DEV/ipv6route" || >+ error "Cannot create .tmp/$VENET_DEV/ipv6route" ${VZ_FS_NO_DISK_SPACE} >+ >+ echo "$ip/$mask" >> ".tmp/$VENET_DEV/ipv6address" || >+ error "Cannot create .tmp/$VENET_DEV/ipv6address" ${VZ_FS_NO_DISK_SPACE} >+ >+ put_param ".tmp/$VENET_DEV/options" "CONFIG_IPV6" "yes" >+ fi >+} >+ >+ > backup_configs() > { > rm -rf .tmp && mkdir -p .tmp || >@@ -125,8 +163,15 @@ add_ip() > local i=0 ipm > for ipm; do > ip_conv $ipm >- i="$(find_unused_alias "$(($i+1))")" >- create_alias "$_IP" "$_MASK" "$i" >+ if [ -z "$_IPV6ADDR" ]; then >+ i="$(find_unused_alias "$(($i+1))")" >+ create_alias "$_IP" "$_MASK" "$i" >+ else >+ if [ "$IPDELALL" = "yes" ]; then >+ del_ipv6_conf "$VENET_DEV" >+ fi >+ add_ip6 "${_IP}" "${_MASK}" >+ fi > done > > move_configs >--- etc/dists/scripts/etcnet-del_ip.sh >+++ etc/dists/scripts/etcnet-del_ip.sh >@@ -59,8 +59,18 @@ del_ip() > local ipm quoted > for ipm; do > ip_conv $ipm >+ > quoted="$(quote_sed_regexp "$_IP/$_MASK")" >- sed -i -e "/^$quoted/d" "$VENET_DEV/ipv4address" >+ if [ -n "$_IPV6ADDR" ]; then >+ sed -i -e "/^$quoted/d" "$VENET_DEV/ipv6address" >+ if [ ! -s "$VENET_DEV/ipv6address" ]; then >+ rm -f -- "$VENET_DEV/ipv6address" >+ rm -f -- "$VENET_DEV/ipv6route" >+ sed -i -e "/^CONFIG_IPV6/d" "$VENET_DEV/options" >+ fi >+ else >+ sed -i -e "/^$quoted/d" "$VENET_DEV/ipv4address" >+ fi > ip addr del dev "$VENET_DEV" "$_IP/$_MASK" > done >
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 27931
: 5623