From 05680da28fa9f94f1b3e3897c8c8e13d13580264 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Tue, 25 Jan 2011 11:28:35 +1000 Subject: Pass interface name correctly when deleting dhcpv6 Bug 6726 Typo in vyatta-address script conversion from perl to shell (cherry picked from commit 4a319dd3a0aa95a92067fa677ad2e5d94534044b) --- scripts/vyatta-address | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/vyatta-address b/scripts/vyatta-address index 2e521c26..94fb1c59 100755 --- a/scripts/vyatta-address +++ b/scripts/vyatta-address @@ -32,7 +32,7 @@ case $1 in exec /opt/vyatta/sbin/vyatta-interfaces.pl --dev="$2" --dhcp=stop elif [[ "$3" = "dhcpv6" ]] then - exec /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --ifname $ifname + exec /opt/vyatta/sbin/vyatta-dhcpv6-client.pl --stop --ifname "$2" elif [[ "$3" =~ ":" ]] then exec ip -6 addr del "$3" dev "$2" -- cgit v1.2.3 From 47a2452f92a33aadc26ba5b591c96cfe81482a9b Mon Sep 17 00:00:00 2001 From: Stig Thormodsrud Date: Mon, 24 Jan 2011 20:03:02 -0800 Subject: Fix 6501: "clear vrrp master interface group " doesnt work with sync groups. (cherry picked from commit 34972b97e834d66147e91c071a1c1caabe18f76f) --- scripts/keepalived/vyatta-clear-vrrp.pl | 32 +++++++++++++++++++++++++------- 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/scripts/keepalived/vyatta-clear-vrrp.pl b/scripts/keepalived/vyatta-clear-vrrp.pl index cdc74cf5..34c0327e 100755 --- a/scripts/keepalived/vyatta-clear-vrrp.pl +++ b/scripts/keepalived/vyatta-clear-vrrp.pl @@ -241,12 +241,31 @@ if ($action eq 'clear_master') { my $conf = <$f>; close $f; - my ($new_conf, $match_instance) = vrrp_extract_instance($conf, $instance); - if ($match_instance !~ /nopreempt/) { - print "Warning: $instance is in preempt mode"; - print " and may retake master\n"; + my $sync_group = list_vrrp_sync_group($intf, $group); + my @instances = (); + if (defined($sync_group)) { + print "vrrp group $vrrp_group on $vrrp_intf is in sync-group " + . "$sync_group\n"; + @instances = list_vrrp_sync_group_members($sync_group); + } else { + push @instances, $instance; + } + + my $new_conf = $conf; + my $clear_instances; + foreach my $inst (@instances) { + my $match_instance; + print "Forcing $inst to BACKUP...\n"; + Vyatta::Keepalived::vrrp_log("vrrp extract $inst"); + ($new_conf, $match_instance) = vrrp_extract_instance($new_conf, $inst); + if ($match_instance !~ /nopreempt/) { + print "Warning: $instance is in preempt mode"; + print " and may retake master\n"; + + } + $match_instance = set_instance_inital_state($match_instance, 'BACKUP'); + $clear_instances .= "$match_instance\n"; } - $match_instance = set_instance_inital_state($match_instance, 'BACKUP'); # # need to set the correct initial state for the remaining instances @@ -265,13 +284,12 @@ if ($action eq 'clear_master') { restart_daemon($conf_file); - print "Forcing $vrrp_intf-$group to BACKUP...\n"; sleep(3); # # add modified instance back and restart # - $new_conf .= "\n" . $match_instance . "\n"; + $new_conf .= "\n" . $clear_instances . "\n"; keepalived_write_file($conf_file, $new_conf); Vyatta::Keepalived::restart_daemon($conf_file); -- cgit v1.2.3 From 60ec9dfcf7c1ddc0f23f540570637db50a49809c Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 26 Jan 2011 10:52:46 +1000 Subject: Rearrange priority for pseudo-ethernet Bug 6116 Do setup at same priority as VIF (since it is really macvlan) Do address after peth mac address is set. (cherry picked from commit 0f3aa38c15bb159d331dcfd91076ac37bd4c524e) --- templates/interfaces/pseudo-ethernet/node.def | 2 +- templates/interfaces/pseudo-ethernet/node.tag/address/node.def | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/templates/interfaces/pseudo-ethernet/node.def b/templates/interfaces/pseudo-ethernet/node.def index 2d2da19f..5b0aaac9 100644 --- a/templates/interfaces/pseudo-ethernet/node.def +++ b/templates/interfaces/pseudo-ethernet/node.def @@ -1,5 +1,5 @@ tag: -priority: 390 +priority: 319 # same as vif type: txt help: Pseudo Ethernet device name val_help: ; Pseudo Ethernet interface name diff --git a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def index d2812446..253c4775 100644 --- a/templates/interfaces/pseudo-ethernet/node.tag/address/node.def +++ b/templates/interfaces/pseudo-ethernet/node.tag/address/node.def @@ -1,5 +1,6 @@ multi: type: txt +priority: 320 # After peth device is initialized help: IP address syntax:expression: exec "/opt/vyatta/sbin/valid_address $VAR(@)" -- cgit v1.2.3