Age | Commit message (Collapse) | Author |
|
2006-02-02 Paul Jakma <paul.jakma@sun.com>
* interface.c: (if_dump_vty) move flags to their line, neater.
|
|
2006-01-25 Paul Jakma <paul.jakma@sun.com>
* (general) More solaris PF_ROUTE hacks. The IFF_UP mangling
for solaris was incomplete on the PF_ROUTE side. fix it.
This changeset generally uglifies things. For some future
work I'd like to see the state changes seperated out from
the details of the code. Differences between systems might
then be slightly easier to implement without convoluted
hacks.
Changes should be specific to Solaris mostly, however
also tested on FreeBSD 6.
* if_ioctl_solaris.c: (interface_list_ioctl) ignore ~IFF_UP
interfaces, we'll hear about them when/if interface goes up
through NEWADDR.
Update flags explicitely at end of it to kick mangling.
* ioctl_solaris.c: (if_mangle_up) removed to interface.c, in
kind.
(lifreq_set_name) more convenient to take the string, than
the ifp.
(if_get_flags_direct) new convenience function, returns
the actual flags. Used during bootstrap in if_ioctl_solaris.c
to peek at flags of logical interfaces to see whether or
not to ignore them.
(if_get_flags) ENXIO means it's gone, poke out IFF_UP and
kick flags update.
(if_{un,}set_flags) flags argument should be 64bit.
* ioctl.{c,h}: flags argument should be 64bit.
* interface.h: Add a 'primary_state' flag to struct zebra_if on
SUNOS_5.
Export if_flags_update.
* interface.c: (if_flags_mangle) moved over in kind from
ioctl_solaris.c. Nasty kludge to try get IFF_UP right, as
much as is possible. Also keep track of the actual IFF_UP
value for the primary interface, so we can know when the ifp
must be deleted.
(if_flags_update) Take a new interface flags value, apply it
to the interface, and take whatever actions are required due
to flag transitions.
(if_refresh) flag state change logic is moved out to
previous. Just call if_get_flags, which will end up using
previous to effect the update of flags.
(if_flag_dump_vty) IFF_IPV{4,6} aren't interesting, VIRTUAL
and NOXMIT are though.
* kernel_socket.c: (ifm_read) Down->Down transitions shouldn't
create ifp, for non-IFANNOUNCE systems.
Use if_flags_update to update flags.
flag transition logic is now handled automatically through
if_flags_update.
(ifam_read) Better to call if_refresh *after* adding
connected addresses, as connected count affects IFF_UP on
IFF_UP-mangled systems.
On Solaris, Up->Down due to DELADDR means we need to delete
the ifp - the IFINFO might already have been and gone.
* rt.h: include other dependent headers.
|
|
* connected.{c,h}: Include memory.h
(connected_add_ipv4) Use MTYPE for ifc label.
(connected_add_ipv6) Also should accept label. Store it in ifp.
(connected_del_ipv4) Taking label as argument is pointless.
* rt_netlink.c: (netlink_interface_addr) update label usage
for connected_{add,delete} functions.
* if_ioctl.c: (if_getaddrs) NULL label for connected_add_ipv6.
* if_ioctl_solaris.c: (interface_list_ioctl) Pass LIFC_NOXMIT
so we also find out about NOXMIT interfaces like VNI.
Bit of hackery to turn interface names into the primary
interface name, later with routing socket messages we only
will about primary interfaces anyway, so we must normalise
the name.
(if_get_addr) take label as argument, so it can
be passed to connected_add.
If label is provided, then it is interface name to issue the
ioctl for address information on, not the ifp name.
(interface_list) List AF_UNSPEC too, just in case.
* if_proc.c: (ifaddr_proc_ipv6) label for connected_add_ipv6.
* interface.c: (if_addr_wakeup) Some very bogus code - sets
IFF_RUNNING - add comment.
(if_refresh)
(ip_address_install) Use MTYPE for ifc label.
* ioctl_solaris.c: (if_mangle_up) New function. Hackery to make
IFF_UP reflect whether any addresses are left on the
interface, as we get signalled for IFF_UP flags change on the
primary interface only. Logical interfaces dont generate
IFINFO, but we do get an RTM_DELADDR.
(if_get_flags) Call if_mangle_up before return.
* kernel_socket.c: (ifam_read) Fixup calls to
connected_{add,delete} to match above changes. Rename gate
variable to brd, less confusing.
Pass the interface name as a label, if it is not same name
as ifp->name.
|
|
* (general) RTM_CHANGE and implicit withdraw on RTM_NEWADDR
support.
* connected.c: (connected_withdraw) new function. withdraw a
connected subnet address set from zebra, and pass information
along to clients.
(connected_announce) similar, but to announce a new connected
subnet address set.
(connected_check_ipv4) renamed to connected_check, as its
AFI independent.
(connected_add_ipv{4,6}) Remove the connected address announce
stuff, use connected_announce instead.
If connected_check indicates address is already present,
treat it as an implicit withdraw of the existing address, ie
remove the old address details and replace with the new
details.
(connected_delete_ipv{4,6}) Use connected_withdraw.
(connected_check_ipv6) deleted in favour of connected_check.
* connected.h: Rename connected_check_ipv4 to connected_check.
delete connected_check_ipv6.
* interface.c: Use connected_check rather than the AFI specific
symbols.
* kernel_socket.c: (rtm_read) RTM_CHANGE support. Create a
rib delete event for the existing route, before adding route
again.
(kernel_read) we can handle RTM_CHANGE now.
|
|
* interface.c: (if_delete_update) should always be available, not
just on RTM_IFANNOUNCE/NETLINK systems.
* kernel_socket.c: (ifan_read) only call if_delete_update when
interface departs, dont if_delete, because we wish to retain
interface configuration state even when interfaces are removed.
(ifm_read) If we dont have RTM_IFANNOUNCE, then transitioning
to down state is only chance we have to clean up interface in case
it is deleted (eg Solaris down -> unplumb -> plumb up).
* redistribute.c: (zebra_interface_delete_update) should always be
available, we /will/ call it now on all systems, via
if_delete_update.
* zserv.c: (zsend_interface_delete) ditto
(zsend_interface_address) Update the call-flow diagramme, to
reflect that if_delete_update /is/ now called on all systems,
potentially.
* zserv.h: (zsend_interface_delete) unconditionally exported, as
above.
|
|
* (global) Extern and static'ification, with related fixups
of declarations, ensuring files include their own headers, etc.
if_ioctl.c: (interface_info_ioctl) fix obvious arg mis-order in
list loop
|
|
* (global): Fix up list loops to match changes in lib/linklist,
and some basic auditing of usage.
* configure.ac: define QUAGGA_NO_DEPRECATED_INTERFACES
* HACKING: Add notes about deprecating interfaces and commands.
* lib/linklist.h: Add usage comments.
Rename getdata macro to listgetdata.
Rename nextnode to listnextnode and fix its odd behaviour to be
less dangerous.
Make listgetdata macro assert node is not null, NULL list entries
should be bug condition.
ALL_LIST_ELEMENTS, new macro, forward-referencing macro for use
with for loop, Suggested by Jim Carlson of Sun.
Add ALL_LIST_ELEMENTS_RO for cases which obviously do not need the
"safety" of previous macro.
LISTNODE_ADD and DELETE macros renamed to ATTACH, DETACH, to
distinguish from the similarly named functions, and reflect their
effect better.
Add a QUAGGA_NO_DEPRECATED_INTERFACES define guarded section
with the old defines which were modified above,
for backwards compatibility - guarded to prevent Quagga using it..
* lib/linklist.c: fix up for linklist.h changes.
* ospf6d/ospf6_abr.c: (ospf6_abr_examin_brouter) change to a single
scan of the area list, rather than scanning all areas first for
INTER_ROUTER and then again for INTER_NETWORK. According to
16.2, the scan should be area specific anyway, and further
ospf6d does not seem to implement 16.3 anyway.
|
|
Fix problems when netlink interfaces are renamed (same ifindex used
for a new interface). Start cleaning up some problems with the way
interface names are handled.
* interface.c: (if_new_intern_ifindex) Remove obsolete function.
(if_delete_update) After distributing the interface deletion message,
set ifp->ifindex to IFINDEX_INTERNAL.
(if_dump_vty) Detect pseudo interface by checking if ifp->ifindex is
IFINDEX_INTERNAL.
(zebra_interface) Check return code from interface_cmd.func.
Do not set internal ifindex values to if_new_intern_ifindex(),
since we now use IFINDEX_INTERNAL for all pseudo interfaces.
* kernel_socket.c: (ifm_read) Fix code and comments to reflect that
all internal interfaces now have ifp->ifindex set to IFINDEX_INTERNAL.
* rt_netlink.c: (set_ifindex) New function used to update ifp->ifindex.
Detects interface rename events by checking if that ifindex is already
being used. If it is, delete the old interface before assigning
the ifindex to the new interface.
(netlink_interface, netlink_link_change) Call set_ifindex to update
the ifindex.
* if.h: Remove define for IFINDEX_INTERNBASE and add define
IFINDEX_INTERNAL 0, since all internal (i.e. non-kernel) pseudo-
interfaces should have ifindex set to 0.
(if_new) Remove function.
(if_delete_retain) New function to delete an interface without
removing from iflist and freeing the structure.
(ifname2ifindex) New function.
* if.c: (if_new) Remove function (absorb into if_create).
(if_create) Replace function if_new with call to calloc.
Set ifp->ifindex to IFINDEX_INTERNAL. Fix off-by-one error
in assert to check length of interface name. Add error message
if interface with this name already exists.
(if_delete_retain) New function to delete an interface without
removing from iflist and freeing the structure.
(if_delete) Implement with help of if_delete_retain.
(ifindex2ifname) Reimplement using if_lookup_by_index.
(ifname2ifindex) New function to complement ifindex2ifname.
(interface) The interface command should check the name length
and fail with a warning message if it is too long.
(no_interface) Fix spelling in warning message.
(if_nametoindex) Reimplement using if_lookup_by_name.
(if_indextoname, ifaddr_ipv4_lookup) Reimplement using
if_lookup_by_index.
* bgp_zebra.c: (bgp_interface_delete) After deleting, set ifp->ifindex
to IFINDEX_INTERNAL.
* isis_zebra.c: (isis_zebra_if_del) Call if_delete_retain instead
of if_delete, since it is generally not safe to remove interface
structures. After deleting, set ifp->ifindex to IFINDEX_INTERNAL.
(zebra_interface_if_lookup) Tighten up code.
* ospf6_zebra.c: (ospf6_zebra_if_del) Previously, this whole function
was commented out. But this is not safe: we should at least update
the ifindex when the interface is deleted. So the new version
updates the interface status and sets ifp->ifindex to
IFINDEX_INTERNAL.
(ospf6_zebra_route_update) Use if_indextoname properly.
* ospf_vty.c: (show_ip_ospf_interface_sub) Show ifindex and interface
flags to help with debugging.
* ospf_zebra.c: (ospf_interface_delete) After deleting, set ifp->ifindex
to IFINDEX_INTERNAL.
(zebra_interface_if_lookup) Make function static. Tighten up code.
* rip_interface.c: (rip_interface_delete) After deleting, set
ifp->ifindex to IFINDEX_INTERNAL.
* ripng_interface.c: (ripng_interface_delete) After deleting, set
ifp->ifindex to IFINDEX_INTERNAL.
|
|
* interface.c, interface.h, rtadv.c, rtadv.h: extensions to Neighbor
discovery for Mobile IPv6.
|
|
implemented.
|
|
|
|
case of /proc being used. I don't have others to test with at the
moment.
|
|
* *.c: Change level of debug messages to LOG_DEBUG.
|
|
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c
needs to include "log.h" to pick up the declaration.
|
|
|
|
ripd might need some more testing though.
|
|
|
|
|
|
|
|
* if_ioctl_solaris.c: HAVE_IPV6 ifdef fixups
* zserv.c: ditto
* ioctl_solaris.c: ditto.
* interface.c: cast for LLADDR
* interface.h: Add guards, include redistribute.h and remove
extraneous definitions of zebra_interface_{up,down}_update
* ioctl.h: Add AF_IOCTL define for non SOLARIS_IPV6
* redistribute.h: include dependent header, zserv.h
* zserv.h: include dependent header, rib.h
|
|
|
|
* ioctl.c: (if_get_mtu) set mtu6 to mtu
* mtu_kvm.c: (if_kvm_get_mtu) set mtu6 to mtu
* rt_netlink.c: (netlink_interface) set mtu6 to mtu
(netlink_link_change) ditto
2004-05-09 Sowmini Varadhan <sowmini.varadhan@sun.com>
* interface.c: (if_delete_update) only used with HAVE_NETLINK
and RTM_IFANNOUNCE.
(if_flag_dump_vty) Solaris IFF_IPV4 and IFF_IPV6 if flags
(if_dump_vty) print mtu6 if not same as mtu
|
|
|
|
|
|
ensure only interfaces that are inactive or do not exist can be deleted
|
|
Add the 'no interface' command to all the daemons and vtysh. now it's
possible to delete interface from routeing daemons as well only if it
doesn't exist in os.
http://hasso.linux.ee/zebra/ht-no_interface_fix.patch
|
|
|
|
http://hasso.linux.ee/zebra/ht-no_interface-23052003.patch
Add the 'no interface' command to all the daemons and vtysh.
|
|
Log:
Removed unused variable in interface.c
|
|
|
|
[zebra 14599] PATCH: permit [no]multicast command for (yet) inactive interfaces
|
|
|