File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 2626
2727import javax .naming .ConfigurationException ;
2828
29+ import com .google .common .base .Strings ;
2930import org .apache .log4j .Logger ;
3031import org .libvirt .LibvirtException ;
3132
@@ -286,7 +287,11 @@ private void deleteExitingLinkLocalRouteTable(String linkLocalBr) {
286287 String [] lines = parser .getLines ().split ("\\ n" );
287288 for (String line : lines ) {
288289 String [] tokens = line .split (" " );
289- if (!tokens [2 ].equalsIgnoreCase (linkLocalBr )) {
290+ if (tokens != null && tokens .length < 2 ) {
291+ continue ;
292+ }
293+ final String device = tokens [2 ];
294+ if (!Strings .isNullOrEmpty (device ) && !device .equalsIgnoreCase (linkLocalBr )) {
290295 Script .runSimpleBashScript ("ip route del " + NetUtils .getLinkLocalCIDR () + " dev " + tokens [2 ]);
291296 } else {
292297 foundLinkLocalBr = true ;
You can’t perform that action at this time.
0 commit comments