summaryrefslogtreecommitdiffstats
path: root/zebra/interface.c
Commit message (Collapse)AuthorAgeFilesLines
* 2005-04-02 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-04-021-30/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2005-03-25 Jean-Mickael Guerin <jean-mickael.guerin@6wind.com>vincent2005-03-251-2/+21
| | | | | * interface.c, interface.h, rtadv.c, rtadv.h: extensions to Neighbor discovery for Mobile IPv6.
* * zebra/interaface.c: "show interface description" commandhasso2005-03-131-0/+47
| | | | implemented.
* * interface.c: Fix CRC and frame errors statistics in Linux.hasso2005-03-061-1/+1
|
* * interface.c: Better statistics output in "show interface" command inhasso2005-01-181-13/+15
| | | | | case of /proc being used. I don't have others to test with at the moment.
* 2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-12-071-4/+4
| | | | * *.c: Change level of debug messages to LOG_DEBUG.
* 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-201-6/+6
| | | | | * global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
* Remove dead "ip tunnel" command.hasso2004-10-281-23/+0
|
* OK. Here it is - PtP patch from Andrew J. Schorr. No problems with ospfd,hasso2004-10-191-4/+2
| | | | ripd might need some more testing though.
* Some compiler warnings fixes and fix for bugzilla #119.hasso2004-10-121-8/+20
|
* New way to handle secondary addresses from Gilad Arnold.hasso2004-10-031-79/+184
|
* Remove usage of evil list and listnode typedefs.hasso2004-09-231-8/+8
|
* 2004-07-23 Sowmini Varadhan <Sowmini.Varadhan@Sun.COM>paul2004-07-231-2/+2
| | | | | | | | | | | | * 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
* OK, here it is - irdp support. But don't expect me to fix any bugs in it.hasso2004-06-121-0/+5
|
* 2004-05-09 Paul Jakma <paul@dishone.st>paul2004-05-091-1/+18
| | | | | | | | | | | | | | * 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
* Temorary secondary-label fix. Real fix from Gilad will follow after release.hasso2004-03-181-0/+23
|
* Fix help. "ipv6 ..." commands are for IPv6.hasso2004-03-111-2/+2
|
* From: Hasso Tepper <hasso@estpak.ee>paul2003-05-241-31/+1
| | | | ensure only interfaces that are inactive or do not exist can be deleted
* From: Hasso Tepper <hasso@estpak.ee>paul2003-05-231-2/+2
| | | | | | | | 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
* Undo Hasso last patch, about to apply a slightly updated patch.paul2003-05-231-2/+2
|
* From: Hasso Tepper <hasso@estpak.ee>paul2003-05-231-2/+2
| | | | | | http://hasso.linux.ee/zebra/ht-no_interface-23052003.patch Add the 'no interface' command to all the daemons and vtysh.
* Amir - rev 198paul2003-04-091-2/+0
| | | | | Log: Removed unused variable in interface.c
* zebra link state detection supportpatch.z12269.linkstatepaul2002-12-131-11/+75
|
* patch from Frank van Maarseveen <F.vanMaarseveen@inter.NL.net>patch.z14599.multicast.inactive.ifpaul2002-12-131-11/+25
| | | | [zebra 14599] PATCH: permit [no]multicast command for (yet) inactive interfaces
* Initial revisionpaul2002-12-131-0/+1387