Commit a0f2b73d authored by Mike Hibler's avatar Mike Hibler
Browse files

Implement IP aliases for Linux (i.e., for multiplexed links).

Not sure why we did not do this originally...
parent 15efae98
#!/usr/bin/perl -wT
#
# EMULAB-COPYRIGHT
# Copyright (c) 2000-2004 University of Utah and the Flux Group.
# Copyright (c) 2000-2004, 2006 University of Utah and the Flux Group.
# All rights reserved.
#
......@@ -296,6 +296,16 @@ sub os_ifconfig_line($$$$$$$;$$)
if ($inet ne "") {
$uplines .= sprintf($IFCONFIG, $iface, $inet, $mask);
$downlines = "$IFCONFIGBIN $iface down";
# handle aliases
my $aix = 0;
foreach my $alias (split(',', $aliases)) {
my $aif = "$iface:$aix";
$uplines .= "\n ";
$uplines .= sprintf($IFCONFIG, $aif, $alias, $mask);
$downlines .= "\n $IFCONFIGBIN $aif down";
$aix++;
}
}
return ($uplines, $downlines);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment