projects
/
project
/
unetd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b75791a
)
scripts/update-cmd.pl: set device up before adding routes/addresses
author
Felix Fietkau
<nbd@nbd.name>
Mon, 29 Aug 2022 11:10:28 +0000
(13:10 +0200)
committer
Felix Fietkau
<nbd@nbd.name>
Mon, 29 Aug 2022 11:10:28 +0000
(13:10 +0200)
Signed-off-by: Felix Fietkau <nbd@nbd.name>
scripts/update-cmd.pl
patch
|
blob
|
history
diff --git
a/scripts/update-cmd.pl
b/scripts/update-cmd.pl
index 1456533cd571881081749d4c89ced66930fef0be..b908ff46d07cd7761026bde9e3cf60e8bc5f09e6 100755
(executable)
--- a/
scripts/update-cmd.pl
+++ b/
scripts/update-cmd.pl
@@
-129,6
+129,8
@@
sub set_active_data_linux($$$) {
my $delete = shift;
my $add = shift;
+ (keys %{$add->{ipaddr}}, keys %{$add->{route}}) > 0 and cmd("ip l s dev $ifname up");
+
foreach my $ip (keys %{$delete->{ipaddr}}) {
cmd("ip a d $ip dev $ifname");
}