Age | Commit message (Collapse) | Author |
|
All the other templates and scripts related to interfaces
are in vyatta-cfg-system
|
|
This fixes Bug 3917 by checking for interface current state rather
than configuration state.
Also changed variable names and command arguments to improve clarity.
Instead of --op_command="dhcp-renew" use "--dhcp renew".
|
|
Also restore "--valid-addr" flag to vyatta-interfaces.pl since it is used outside
this package.
|
|
Changed the the set-time and commit-time check of ethernet interface address
values. These checks need to prevent configuring both DHCP and static
IPv4 addresses on the same interfac. The previous checks were comparing
against the running configuration tree, not the proposed config tree. Now
the set-time check is purely a syntax check, and the commit-time check
only checks for both DHCP and static IPv4 addresses in the proposed config.
The system now allows DHCP and static IPv6 addresses to be configured on
the same interface.
|
|
The script was hiding any error exit codes from 'ip' command.
Switch to using exec so that error exits fail the commit.
Discovered when testing with IPV6 disabled.
|
|
|
|
|
|
Move the speed/duplex setting into script where we can handle errors
better, and avoid setting speed/duplex twice.
(cherry picked from commit 330470f1f060f579434eb89469f4ed021c95449d)
|
|
Better than reading sysfs directly.
|
|
Simpler to use new getIP() for all address fetching
|
|
Don't just silently exit on incorrect address format.
At least print an error
|
|
Bug 4311
Doing grep ($ip, @list) will return whole list since it evaluted
$ip as a expression and the result was defined.
|
|
If interface is down (because of release), then renew should still
be able restart interface.
|
|
More convient to do it here.
|
|
|
|
Remove duplicates from list, and make sure getIP is exported, and that
explicit imports are listed.
|
|
|
|
Need good way to find path to get current MTU.
|
|
|
|
|
|
Standard perl convention is undefined for false rather than 0.
|
|
Trying to have uniform library to interface state.
|
|
Extra comma in options hash list!
Get rid of perl function prototype for usage.
Perl Best Practices and other books recommend against them.
Move up exit to avoid surprises in later code.
|
|
For when templates want to check for interface but
not die.
|
|
|
|
|
|
|
|
Have one central place for validity checks.
|
|
When finding allwed VIF, want to show vif id not name.
|
|
Use new Vyatta::Interface mtu function to handle all interface
types with DHCP.
|
|
|
|
Many templates should allow any known interface type, since
interface may be created later. So create some generic hooks
for validation.
|
|
Unify all code that does name -> interface attribute translation
into one place. No need to pass interface path to scripts, and handle
addresses correctly in DHCP code. Use 'undef' consitently for false
in perl code.
|
|
htonl and if_nametoindex are not used.
|
|
Use hierarchal directory structure
|
|
interface has been disabled in CLI
|
|
|
|
|
|
|
|
Make sure and check if system commands worked.
|
|
Grep already has a count option, so use it.
|
|
Don't need to run a command to remove a file.
|
|
Don't need to call out to shell to create directory
|
|
Use perl to do the touch command.
|
|
Fix some assumptions in the vyatta-interfaces script that prevent
using dhcp on bonded devices
Bugfix 3835
|
|
Add more hacks to already fragile code that depends on interface
name. When next type is added this needs to be reworked.
Bugfix 3835
|
|
|
|
- also move temp files for release of dhcp interface to /var/run from /var/lib
|
|
Specified Value
- only request for dhcp-option interface-mtu from a dhcp-server for an ethernet interface using dhcp to get IP
- do not request for interface-mtu for other interfaces that use dhcp i.e. ethernet vifs and bridges
- request for interface-mtu from dhcp-server for ethernet interfaces, only if ethernet mtu not set in CLI
|
|
dhclient-script
|