summaryrefslogtreecommitdiff
path: root/scripts/vyatta-interfaces.pl
AgeCommit message (Collapse)Author
2009-09-09Bugfix 4700, 4269: Fix set and commit-time checks of ethernet address valuesBob Gilligan
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.
2009-08-27Failure to set address should fail the commitStephen Hemminger
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.
2009-06-30Fix 4664: 'set failed' is returned when duplicated interface IP address is setStig Thormodsrud
2009-06-26make changes to work with dhcp 4.1.0Mohit Mehta
2009-06-12Manage speed duplex in vyatta-interfaces.plStephen Hemminger
Move the speed/duplex setting into script where we can handle errors better, and avoid setting speed/duplex twice. (cherry picked from commit 330470f1f060f579434eb89469f4ed021c95449d)
2009-05-21Add script option to check if interface is upStephen Hemminger
Better than reading sysfs directly.
2009-04-28Use getIP() to check for duplicatesStephen Hemminger
Simpler to use new getIP() for all address fetching
2009-04-28Catch incorrect address formatStephen Hemminger
Don't just silently exit on incorrect address format. At least print an error
2009-04-28Fix bug in is_ip_configuredStephen Hemminger
Bug 4311 Doing grep ($ip, @list) will return whole list since it evaluted $ip as a expression and the result was defined.
2009-04-28DHCP should be checking config not flagsStephen Hemminger
If interface is down (because of release), then renew should still be able restart interface.
2009-04-28Need to convert path to have slashesStephen Hemminger
More convient to do it here.
2009-04-27Merge branch 'jenner' of 192.168.100.1:git/vyatta-cfg into jennerStephen Hemminger
2009-04-27Cleanup exports of Vyatta::MiscStephen Hemminger
Remove duplicates from list, and make sure getIP is exported, and that explicit imports are listed.
2009-04-27fix broken call to getIPMohit Mehta
2009-04-27vyatta-interfaces changes for DHCPStephen Hemminger
Need good way to find path to get current MTU.
2009-04-27Handle errors better in show_mtuStephen Hemminger
2009-04-27Add method to show configured mtuStephen Hemminger
2009-04-20Use undef for falseStephen Hemminger
Standard perl convention is undefined for false rather than 0.
2009-04-20Use getIP rather than call 'ip addr'Stephen Hemminger
Trying to have uniform library to interface state.
2009-04-20Fix vyatta-interfacesStephen Hemminger
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.
2009-04-01Add --warn option for vyatta-interfacesStephen Hemminger
For when templates want to check for interface but not die.
2009-03-05Fix is_valid_name() to support any valid interface type (--check all).Stig Thormodsrud
2009-03-04Merge branch 'jenner' of http://git.vyatta.com/vyatta-cfg into jennerStig Thormodsrud
2009-03-04Fix show_interfaces() so that it includes vlans for $type='all'.Stig Thormodsrud
2009-03-03Extend vyatta-interfaces to do device name checkingStephen Hemminger
Have one central place for validity checks.
2009-02-27Fix --vif optionStephen Hemminger
When finding allwed VIF, want to show vif id not name.
2009-02-26Handle MTU on all types of interfaceStephen Hemminger
Use new Vyatta::Interface mtu function to handle all interface types with DHCP.
2009-02-26Add option to show VIF for interfaceStephen Hemminger
2009-02-10Add new option for checking name validityStephen Hemminger
Many templates should allow any known interface type, since interface may be created later. So create some generic hooks for validation.
2009-01-12Use new interfaces routinesStephen Hemminger
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.
2009-01-12Remove unused functionsStephen Hemminger
htonl and if_nametoindex are not used.
2008-11-21Convert VyattaConfig (et al) to Vyatta::ConfigStephen Hemminger
Use hierarchal directory structure
2008-11-19Fix Bug 3917 dhcp brings interface up for lease acquire/renew even though ↵Mohit Mehta
interface has been disabled in CLI
2008-11-17add check for bond vif interface to submoduleMohit Mehta
2008-11-17move submodules to VyattaMisc.pm so that they can be used elsewhere as wellMohit Mehta
2008-11-14rectify check for bond interfaceMohit Mehta
2008-11-14Check result of system commandsStephen Hemminger
Make sure and check if system commands worked.
2008-11-14Use grep -c rather than running wc commandStephen Hemminger
Grep already has a count option, so use it.
2008-11-14Use perl unlink rather than rmStephen Hemminger
Don't need to run a command to remove a file.
2008-11-14Use perl mkdirStephen Hemminger
Don't need to call out to shell to create directory
2008-11-14Implement touch in perlStephen Hemminger
Use perl to do the touch command.
2008-10-30Allow dhcp on bondingStephen Hemminger
Fix some assumptions in the vyatta-interfaces script that prevent using dhcp on bonded devices Bugfix 3835
2008-10-24Fix dhcp on bondingStephen Hemminger
Add more hacks to already fragile code that depends on interface name. When next type is added this needs to be reworked. Bugfix 3835
2008-08-04Move is_ip_v4_or_v6() to VyattaMisc.pm so other scripts can use it.Stig Thormodsrud
2008-07-25Fix Bug 3524 dhcp client doesn't insert default route on system rebootMohit Mehta
- also move temp files for release of dhcp interface to /var/run from /var/lib
2008-07-23Fix Bug 3318 ENHANCEMENT REQUEST: Option to NOT Accept DHCP MTU Offers Below ↵Mohit Mehta
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
2008-06-26removing code to update resolv.conf from here, it is better to call it from ↵Mohit Mehta
dhclient-script
2008-06-26=> Modified VyattaConfig.pm function 'returnOrigValues()' to return empty ↵Mohit Mehta
array when no value is configured => Modified VyattaConfigLoad.pm to give a higher ranking to 'system host-name' than 'interface' so that during boot-up if host is using dhcp client to get an ip for an interface, it can send the host-name if configured => Modified vyatta-interfaces.pl: 1. to request only for dhcp options 'subnet-nask', 'broadcast address', 'routers', 'domain-name-servers' when an interface is configured to get an ip using dhcp. 2. ask for a domain-name only if domain-name is not configured in our CLI 3. do not request dhcp options: 'time-offset', 'interface-mtu' and 'host-name' that were being requested before 4. Update /etc/resolv.conf to remove domain-name and name-server options received from dhcp server for the particular interface that releases dhcp lease either from op-mode or cfg-mode
2008-06-21better handling of allowed values for 'release/renew dhcp interface <>'Mohit Mehta
2008-06-21better handling of dhcp release/renew commandsMohit Mehta