Age | Commit message (Collapse) | Author |
|
Fixes error when creating bridge interfaces:
ValueError: <module 'time' (built-in)> must be a number
|
|
this patch allows to get or change many interface options (mtu, arp settings, ...)
using get_interface / set_interface functions
|
|
|
|
Commit 17dd50751d ("bfd: T1949: fix verification logic for IPv6 BFD peers")
added a mechanism to probe if an IPv6 address is link-local or not. Sometimes
an interface suffix is appended by %interface to a link-local address, as we
need to know an interface for which this address is (hence the name) link-local.
Remove any interface identifier before checking if the address is local or not.
|
|
IPv6 BFD peers only require a source address unless link-local addresses are used.
|
|
- management-address is not a <multi/> node
- added new vyos.validate.is_loopback_addr() function - returns true is address
passed is a looback address
|
|
|
|
|
|
Verify if the given IPv4/IPv6 address is assigned to specific interface. It can
check both a single IP address (e.g. 192.0.2.1 or a assigned CIDR address
192.0.2.1/24.
Used testbench:
===============
20: br0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
inet 192.0.2.1/24 brd 192.0.2.255 scope global br0
inet 192.0.3.1/24 brd 192.0.3.255 scope global br0
inet6 2001:db8:2::ffff/64 scope global tentative
inet6 2001:db8:1::ffff/64 scope global tentative
is_intf_addr_assigned('br0', '192.0.2.1/24') -> True
is_intf_addr_assigned('br0', '192.0.2.1') -> True
is_intf_addr_assigned('br0', '2001:db8:2::ffff/64') -> True
is_intf_addr_assigned('br0', '2001:db8:2::ffff') -> True
is_intf_addr_assigned('br0', '192.0.100.1/24') -> False
is_intf_addr_assigned('br0', '192.0.100.1') -> False
is_intf_addr_assigned('br0', '2001:db8:100::ffff/64') -> False
is_intf_addr_assigned('br0', '2001:db8:100::ffff') -> False
|
|
interface
|
|
Previosly the check failed when a network statement was passed which contained
host bits set e.g. 192.0.2.1/24. This no longer is an issue b/c this is
a valid v4 address. Address is now split on / and validated.
|
|
The problem is that some IPv6 addresses reported by the system (mainly
link-local addresses) contain an interface suffix like %eth0, this was
not properly handeled in the validator script.
Remove any given interface attribute on passed IPv6 addresses. If no
interface suffix is added - there is no problem.
|
|
|
|
Verify given IPv4/IPv6 subnet is connected to any interface on this
system. Required by e.g. DHCP server that we have for IPv4 and IPv6.
|
|
* is_addr_assigned(addr) - Test if address is assigned to ANY interface
on the system
* is_ipv4(addr) - Test if it is an IPv4 address, both network and host
* is_ipv6(addr) - Test if it is an IPv6 address, both network and host
|