Age | Commit message (Collapse) | Author |
|
2006-01-19 Paul Jakma <paul.jakma@sun.com>
* (general) various miscellaneous compiler warning fixes.
Remove redundant break statements from switch clauses
which return.
return from main, not exit, cause it annoys SOS.
Remove stray semi-colons which cause empty-statement
warnings.
* zebra/main.c: (sighup) remove private declaration of external
function.
|
|
* zebra_rib.c: Take interface metric into account.
|
|
2006-01-17 Paul Jakma <paul.jakma@sun.com>
* kernel_socket.c: (ifam_read) Read metric from RTM_NEWADDR.
If interface is an alias, pass the alias as a label for
connected_add_ipv{4,6}.
* rt_netlink.c: (netlink_interface_addr) print out
IFA_CACHEINFO info, if present, when debugging kernel
messages.
|
|
2006-01-17 Gunnar Stigen <gunnar.stigen@axxessit.no>
* if_ioctl.c: (if_getaddrs) Be defensive about assuming
that struct ifaddrs will have ifa_addr filled in.
|
|
2006-01-17 Gunnar Stigen <gunnar.stigen@axxessit.no>
* connected.c: (connected_up_ipv{4,6}) Include interface metric on
connected routes.
|
|
2006-01-16 Paul Jakma <paul.jakma@sun.com>
* lib/zclient.h: Update the Zserv protocol header with a version
field. Define the old command field to be a 'marker', to
allow old Zserv and updated Zserv to be differentiated.
Future updates will bump the version field obviously. New
command field is made wider. Try to stop using the
'zebra_size_t' typedef in the callbacks.
* lib/zclient.c: Update to read/write new format header.
* zebra/zserv.c: Ditto
|
|
2006-01-11 Paul Jakma <paul.jakma@sun.com>
* if.h: (struct interface) expand flags to 8 bytes.
* zclient.c: (zebra_interface_{add,state}_read) stream read of
interface flags now need to use stream_getq.
(zebra_interface_if_set_value) ditto
2006-01-11 Paul Jakma <paul.jakma@sun.com>
* zserv.c: (zsend_interface_{add,delete,update}) if flags are
8 bytes now, update to write out with stream_putq.
|
|
|
|
* rt_socket.c (kernel_rtm_ipv4): Use AF_INET rather than AF_UNSPEC
for mask. From David Young.
|
|
2005-11-26 Paul Jakma <paul.jakma@sun.com>
* connected.{c,h}: (connected_add_ipv6) label should have
const qualifier, fix declarations.
|
|
2005-11-24 Paul Jakma <paul.jakma@sun.com>
* kernel_socket.h: New header for functions exported to sysctl
methods.
* kernel_socket.c: include previous.
Remove static qualifier from couple of functions which are
used by sysctl methods, incorrectly added in previous commit.
Add a workaround for a bogus gcc warning to the RTA_ macros.
* Makefile.am: Add kernel_socket.h to noinst_HEADERS
* if_sysctl.c: include rt.h and kernel_socket.h and remove
redundant prototypes.
* rtread_sysctl.c: ditto.
(route_read) fix mismatch of return values.
* {rt,zserv,rib}.h: Include lib headers depended on.
|
|
2005-11-23 Paul Jakma <paul.jakma@sun.com>
* (general) fix some small compile errors, and mark several
functions as static.
* kernel_socket.c: (ifan_read) should be static.
fix missing brackets.
(ifm_read,ifam_read,rtm_read_mesg,kernel_read) Make static
(ifam_read_mesg) make static. fix incorrect variable name.
(rtm_read) make static. Fix call to rib_delete_ipv4 which
should be rib_delete_ipv6.
(routing_socket,kernel_init) should be static. Void argument
should be specified as such, not left incomplete.
* rt_netlink.c: rt.h should be included, contains prototypes of
exported functions.
(kernel_delete_ipv6_old) fix sign of index argument.
* rt_socket.c: Exact same as previous. Also, make various
functions static.
* rtread_getmsg.c: Include zserv.h, which prototypes
route_read. Make static.
* rtread_sysctl.c: zserv.h and rt.h should be included.
fix definition of route_read.
|
|
* zebra_rib.c: (rib_process) convert to new workqueue specs and
shut up gcc, which complains about cast from void via
function parameters, for some dumb reason. Do the cast
inside the function instead.
(rib_queue_qnode_del) ditto.
(rib_queue_init) no need for the casts anymore.
|
|
2005-11-12 Alexander Gall <gall@switch.ch>
* See [quagga-dev 1815]
* kernel_socket.c: (rtm_write) Use SAROUNDUP when HAVE_SIN_LEN
is not available.
* rt_socket.c: (kernel_rtm_ipv6(_multipath)) set family to
AF_INET6 on ipv6 routes.
2005-11-12 Paul Jakma <paul.jakma@sun.com>
* kernel_socket.c: Add RTA_NAME_GET macro to extract name from
sockaddr_dl. Add some more RTF_ flags.
* (ifan_read) Add some debug messages.
* (ifm_read) Add more debug messages. More robust cross-checks
of index against name.
Fall back to by-name lookup if the index lookup fails, future
proofing more than anything else.
(ifam_read_mesg) Read RTA_IFP. Add debug messages.
(ifam_read) More debug. If there's an RTA_IFP and it isn't
the name of the interface, save it as the label.
(rtm_read_mesg) Read RTA_IFP.
(rtm_read) allow name to be retrieved.
(rtmsg_debug) expand on the debug message.
|
|
2005-11-11 Paul Jakma <paul.jakma@sun.com>
* kernel_socket.c: (ifm_read) arithmetic on void pointer
warning.
(ifam_read) Fix error from connected-with-label merge,
something crept in from the pending Solaris kernel_socket.c
patch which shouldn't have.
|
|
|
|
* 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.
|
|
* connected.{c,h}: (connected_{add,delete}_ipv4) label should
be const qualified.
|
|
* zebra.h: Declare new functions zebra_route_string() and
zebra_route_char().
* log.c: (zroute_lookup,zebra_route_string,zebra_route_char) New
functions to map zebra route numbers to strings.
* zebra_vty.c: (route_type_str) Remove obsolete function: use new
library function zebra_route_string() instead. Note that there
are a few differences: for IPv6 routes, we now get "ripng" and
"ospf6" instead of the old behavior ("rip" and "ospf").
(route_type_char) Remove obsolete function: ues new library function
zebra_route_char() instead. Note that there is one difference:
the old function returned 'S' for a ZEBRA_ROUTE_SYSTEM route,
whereas the new one returns 'X'.
(vty_show_ip_route_detail,vty_show_ipv6_route_detail) Replace
route_type_str() with zebra_route_string().
(vty_show_ip_route,vty_show_ipv6_route) Replace route_type_char()
with zebra_route_char().
* bgp_vty.c: (bgp_config_write_redistribute) Use new library function
zebra_route_string instead of a local hard-coded table.
* ospf6_asbr.c: Remove local hard-coded tables zroute_name and
zroute_abname. Change the ZROUTE_NAME macro to use new library
function zebra_route_string(). Remove the ZROUTE_ABNAME macro.
(ospf6_asbr_external_route_show): Replace ZROUTE_ABNAME() with
a call to zebra_route_char(), and be sure to fix the format string,
since we now have a char instead of a char *.
* ospf6_zebra.c: Remove local hard-coded tables zebra_route_name and
zebra_route_abname. Note that the zebra_route_name[] table
contained mixed-case strings, whereas the zebra_route_string()
function returns lower-case strings.
(ospf6_zebra_read_ipv6): Change debug message to use new library
function zebra_route_string() instead of zebra_route_name[].
(show_zebra): Use new library function zebra_route_string() instead
of zebra_route_name[].
* ospf_dump.c: Remove local hard-coded table ospf_redistributed_proto.
(ospf_redist_string) New function implemented using new library
function zebra_route_string(). Note that there are a few differences
in the output that will result: the new function returns strings
that are lower-case, whereas the old table was mixed case. Also,
the old table mapped ZEBRA_ROUTE_OSPF6 to "OSPFv3", whereas the
new function returns "ospf6".
* ospfd.h: Remove extern struct message ospf_redistributed_proto[],
and add extern const char *ospf_redist_string(u_int route_type)
instead.
* ospf_asbr.c: (ospf_external_info_add) In two messages, use
ospf_redist_string instead of LOOKUP(ospf_redistributed_proto).
* ospf_vty.c: Remove local hard-coded table distribute_str.
(config_write_ospf_redistribute,config_write_ospf_distribute): Use
new library function zebra_route_string() instead of distribute_str[].
* ospf_zebra.c: (ospf_redistribute_set,ospf_redistribute_unset,
ospf_redistribute_default_set,ospf_redistribute_check)
In debug messages, use ospf_redist_string() instead of
LOOKUP(ospf_redistributed_proto).
* rip_zebra.c: (config_write_rip_redistribute): Remove local hard-coded
table str[]. Replace str[] with calls to new library function
zebra_route_string().
* ripd.c: Remove local hard-coded table route_info[].
(show_ip_rip) Replace uses of str[] with calls to new library
functions zebra_route_char and zebra_route_string.
* ripng_zebra.c: (ripng_redistribute_write) Remove local hard-coded
table str[]. Replace str[i] with new library function
zebra_route_string(i).
* ripngd.c: Remove local hard-coded table route_info[].
(show_ipv6_ripng) Use new library function zebra_route_char() instead
of table route_info[].
|
|
* rt_netlink.c: (netlink_request) Use memset to clear structure
before calling sendto (eliminates a valgrind error message about
uninitialized data).
|
|
* configure.ac: Add the test for Solaris least-privileges. Set
defines for whether capabilities are supported and whether of
the linux or solaris variety.
Add missing-prototypes, missing-declarations, char-subscripts
and cast-qual warnings to default cflags, cause Hasso enjoys warnings,
and we really should clean the remaining ones up. (ie isisd..).
* (*/*main.c) Update the zebra_capabilities_t arrays in the various
daemons to match the changes made in lib/privs.h.
* zebra.h: Solaris capabilities requires priv.h to be included.
* privs.{c,h}: Add support for Solaris Least-Privileges.
privs.h: Reduce some of the abstract capabilities, which do
not have rough equivalents on both systems. Rename the net
related caps to _NET, as they should have been in first
place.
(zprivs_terminate) should take the zebra_privs_t as argument so
that it can update change pointer.
Add an additional privilege state, ZPRIVS_UNKNOWN.
* privs.c: (various capability functions) Add
Solaris privileges variants.
(zprivs_state) Use privs.c specific generic types to
represent various capability/privilege related types, so that
each can be typedef'd as appropriate on each platform.
(zprivs_null_state) static added, to hold the state the null
method should report (should be raised by default, and
LOWERED if zprivs_terminate has been called)
(zprivs_state_null) Report back the zprivs_null_state.
(cap_map) Make it able to map abstract capability to multiple
system capabilities.
(zcaps2sys) Map to abstract capabilities to multiple system
privileges/capabilities.
(zprivs_init) move capability related init to seperate
function, zprivs_caps_init.
(zprivs_terminate) ditto, moved to zprivs_caps_terminate.
Set the change_state callback to the NULL state, so the
user can continue to run and use the callbacks.
|
|
* lib/filer.c: show protocol name in filter_show()
* lib/plist.c: show protocol name in vty_show_prefix_entry()
* routemap.c: show protocol name in vty_show_route_map_entry()
* lib/vty.c: in vty_command(), show protocol name if command unknown
* zebra/zserv.c: Always provide distance fo route add
* ripd/rip_snmp.c: rip2IfConfReceive() sends values in conformance
with RFC. Also PeerDomain is now set to a STRING type.
* ripd/ripd.h: rip_redistribute_add() API includes metric and distance
* ripd/ripd.c: rip_redistribute_add() API i.e. stores metric and distance
Now allows a RIP-route to overcome a redistributed route coming
from a protocol with worse (higher) administrative distance
Metrics from redistribution are shown in show ip rip
* ripd/rip_zebra.c: adapt to the rip_redistribute_add() API, i.e.
provide distance and metric
* ripd/rip_interface.c: adapt to the rip_redistribute_add() API
* ripd/rip_routemap.c: no RMAP_COMPILE_ERROR on (metric > 16) usage
rather a CMD_WARNING, because set metric ius shared with other
protocols using larger values (such as OSPF)
The match metric action takes first external metric if present
(from redistribution) then RIP metric.
|
|
usage with HAVE_IPV6
|
|
add is treated as implicit withdraw.
|
|
rib_delete_ipv6() to match routes in the RIB by their gateway as
well as by destination.
|
|
* zebra_rib.c: (static_uninstall_ipv{4,6}) Fix regression wrt
removal of static routes with multiple-hops introduced with
the workqueue conversion. We should free the relevant
nexthop and then get rib_process to run, otherwise we just
get same static route back again (with no way to unconfigure
it, because its already deleted from configuration).
|
|
* (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.
|
|
rib_add_ipv6() function so that IPv6 routes in RIB can have correct
metric. No IPv6 routing daemon uses distance yet though.
* zserv.c, connected.c, kernel_socket.c, rt_netlink.c,
rtread_proc.c,zserv.c: Pass metric and distance info to the
rib_add_ipv6().
Forwardport from stable branch.
|
|
* 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.
|
|
* kernel_socket.c: (RTA_{ADDR,ATTR}_GET) fix mistake, NULL check
should be on DEST argument
|
|
* (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
|
|
* kernel_socket.c: consolidate the IFAM{ADDR,MASK}GET and
RTM{ADDR,MASK}GET macros into generic rta_addrs macros,
RTA_{ADDR,ATTR}_GET.
(af_check) could use 'inline' attribute
(ifam_read_mesg) remove IFAM{ADDR,MASK}GET macro, change to
generic macro.
(rtm_read_mesg) similar
|
|
* rt_netlink.c (netlink_parse_info): Fix debug messages - nlmsg_pid is
unsigned and one zlog call had swapped arguments.
* rt_netlink.c (netlink_route_multipath): Fix compile with disabled
IPv6 support.
[backport candidate] - with stuff commited to rt_netlink.c before to
fix logging in netlink_route_multipath().
|
|
* zserv.c: (zsend_route_multipath) Fix bug if route is sent
with no NEXTHOP_FLAG_FIB nexthops. As ZAPI_MESSAGE_IFINDEX
and ZAPI_MESSAGE_NEXTHOP are always set, clients would try
read non-existent nexthop information and hit stream assert.
Zserv is still broken for multi-nexthop messages, but it always was.
|
|
* zserv.h: Remove ZEBRA_PORT definition, its in lib/zebra.h now
|
|
* rib.h: (struct rib) Add lock field for refcounting.
* zserv.h: (struct zebra_t) Add a ribq workqueue to the zebra
'master' struct.
* zserv.c: (zread_ipv4_add) XMALLOC then memset should be XCALLOC.
* zebra_rib.c: Clean up refcounting of route_node, make struct rib
refcounted and convert rib_process to work-queue. In general,
rib's should be rib_addnode'd and delnode'd to route_nodes, and
these symmetrical functions will manage the locking of referenced
route_node and freeing of struct rib - rather than having users
manage each seperately - with much scope for bugs..
(newrib_free) removed and replaced with rib_lock
(rib_lock) new function, check state of lock and increment.
(rib_unlock) new function, check lock state and decrement. Free
struct rib if refcount hits 0, freeing struct nexthop's, as
newrib_free did.
(rib_addnode) Add RIB to route_node, locking both.
(rib_delnode) Delete RIB from route_node, unlocking each.
(rib_process) Converted to a work-queue work function.
Functional changes are minimal, just arguments, comments and
whitespace.
(rib_queue_add_qnode) Helper function to setup a ribq item.
(rib_queue_add) Helper function, same arguments as old
rib_process, to replace in callers of rib_process.
(rib_queue_qnode_del) ribq deconstructor.
(rib_queue_init) Create the ribq.
(rib_init) call rib_queue_init.
(remainder) Sanitise refcounting of route_node's. Convert to
rib_queue_add, rib_addnode and rib_delnode. Change XMALLOC/memset
to XCALLOC. Remove calls to nexthop_delete and nexthop_free.
|
|
* if_ioctl_solaris.c: (if_lookup_linklocal) fix order of args
in ALL_LIST_ELEMENTS_RO macro.
|
|
* zserv.c (zebra_client_read): Fix bug: first read attempt should
read ZEBRA_HEADER_SIZE minus the number of bytes already read.
Improve efficiency by maintaining a calculation of the number
of bytes read instead of calling stream_get_endp multiple times.
If message length is too small, issue a warning message (not debug)
before closing the connection. And also check that message length
is not too big.
|
|
about IPv6 nexthops.
|
|
status to unsigned here, because we already checked that it isn't
negative or 0.
* rt_netlink.c (netlink_interface_addr): Prefix length belongs to the
address, not to the interface.
* rt_netlink.c (netlink_route_multipath): Fix debug. No useless info
is printed out now and IPv6 info is handeled.
|
|
* (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.
|
|
* lib/vty.c: Improve logging of failures to open vty socket(s).
See bugid #163.
* zebra/zserv.c: print more helpful errors when we fail to successfully
bind and listen on zserv socket. Closes bugzilla #163.
|
|
* if_ioctl.c: (interface_list_ioctl) Use if_get_by_name_len.
* if_proc.c: (ifaddr_proc_ipv6) Increase size of ifname buffer to
avoid overflow.
* kernel_socket.c: (ifan_read) Use if_get_by_name_len.
* if.h: Fix comments to reflect that if_lookup_by_name and
if_get_by_name now require the argument strings to be NUL-terminated.
* if.c: (if_lookup_by_name) Compare using strcmp.
(if_get_by_name) Pass strlen(ifname) as 2nd arg to if_create.
|
|
* if.h: (if_lookup_by_name_len, if_get_by_name_len) New functions.
* if.c: (if_lookup_by_name_len, if_get_by_name_len) New functions.
(if_get_by_name) Tighten up code.
(interface) Use new function if_get_by_name_len.
* zclient.c: (zebra_interface_add_read) Use new if_get_by_name_len
function.
(zebra_interface_state_read) Use new if_lookup_by_name_len function.
* kernel_socket.c: (ifm_read) Use new if_lookup_by_name_len function
to save a memcpy.
* if_ioctl_solaris.c: (interface_list_ioctl) Fix subtle bug with new
if_get_by_name_len function.
* ospf_interface.c: (ospf_vl_new) Use strnlen to fix call to if_create.
|
|
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.
|
|
it's not for debug.
* rt_netlink.c (netlink_talk): Don't assume we use netlink_cmd
although we do now actually.
* rt_netlink.c (netlink_route, netlink_route_multipath): Always use
netlink_cmd to send messages to the kernel.
[backport candidate]
|
|
* irdp.h: Add prototype for irdp_sock_init, and fix protos for
other irdp_* functions.
* irdp_interface.c: (irdp_if_start) If irdp_sock is negative,
call irdp_sock_init to create the IRDP socket.
(irdp_if_init) Rename to irdp_init().
(get_iflist_ifp) Remove function that is a duplicate of
if_lookup_by_index.
(*) Make many functions static. And remove superfluous "\n" from
several zlog messages.
* irdp_main.c: (irdp_init) Remove function that used to call
irdp_if_init() and irdp_sock_init(), since we will now create
the socket only upon first use.
(irdp_sock_init) Do not update global irdp_sock variable, just
return the fd and assume that the caller will do so. If setsockopt
calls fail, close the socket before returning -1.
(*) Make many functions static.
* irdp_packet.c: Initialize irdp_sock to -1.
(irdp_read_raw) Call standard library function if_lookup_by_index
instead of get_iflist_ifp.
(irdp_recvmsg) Should be static, not global.
|
|
* rt_netlink.c: (netlink_link_change) If the status of an
operative interface changes (e.g. MTU changes), the client
daemons should be notified by calling zebra_interface_up_update.
Previously, the information was being updated in zebra's
interface structure, but the clients were not notified of
changes to an operative interface.
* ospf_zebra.c: (ospf_interface_state_up) If the MTU of an operative
interface changes, print a debug message and call ospf_if_reset()
to simulate down/up on the interface.
* ospf_interface.h: Declare new function ospf_if_reset().
* ospf_interface.c: (ospf_if_reset) New function to call ospf_if_down
and ospf_if_up for all ospf interfaces attached to an interface.
|
|
must be after lib/ includes in some systems. Introduce SNMP_INCLUDES
for that.
|
|
* interface.c, interface.h, rtadv.c, rtadv.h: extensions to Neighbor
discovery for Mobile IPv6.
|