Age | Commit message (Collapse) | Author |
|
Use the array_size() helper macro. Replaces several instances of local
macros with the same definition.
Reviewed-by: Scott Feldman <sfeldma@cumulusnetworks.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
* fix disagreement with C99 in zlog_debug calls
Format specifier in some zlog_debug calls for size_t values
was changed in order to C99 ('%u' -> '%zu').
* fix -Wsign-compare warnings
Type of return value of ospf6_packet_max() was changed.
|
|
* ospf6_message.h
* OSPF6_MESSAGE_TYPE_CANONICAL(): dismiss
* OSPF6_MESSAGE_TYPE_NAME(): dismiss
* ospf6_message.c
* ospf6_message_type_str: rewrite as a message list, add max value
* ospf6_packet_examin(): update to use LOOKUP()
* ospf6_receive(): idem
* ospf6_send(): idem
|
|
As long as ospf6_packet_examin() is now the single checkpoint for
received packets, most of the old checks performed elsewhere can
be converted into assert() constructs. Malformed input data at
respective points can be attributed solely to a programming error,
not a malformed packet.
* ospf6_message.c
* ospf6_hello_print()
* ospf6_dbdesc_print()
* ospf6_lsreq_print()
* ospf6_lsupdate_print()
* ospf6_lsack_print()
* ospf6_hello_recv()
* ospf6_dbdesc_recv_master()
* ospf6_dbdesc_recv_slave()
* ospf6_lsreq_recv()
* ospf6_lsupdate_recv()
* ospf6_lsupdate_recv()
* ospf6_lsack_recv()
* ospf6_receive()
|
|
* ospf6_message.c: (ospf6_packet_max): new function, return maximum IPv6
payload on an interface; (ospf6_hello_send, ospf6_dbdesc_send,
ospf6_dbdesc_send_newone, ospf6_lsreq_send, ospf6_lsupdate_send_neighbor,
ospf6_lsupdate_send_interface, ospf6_lsack_send_neighbor,
ospf6_lsack_send_interface): compare message size with the maximum
payload instead of the MTU.
|
|
This vulnerability (CERT-FI #514840) was reported by CROSS project.
ospf6d processes IPv6 prefix structures in incoming packets without
verifying that the declared prefix length is valid. This leads to a
crash
caused by out of bounds memory access.
* ospf6_abr.h: new macros for size/alignment validation
* ospf6_asbr.h: idem
* ospf6_intra.h: idem
* ospf6_lsa.h: idem
* ospf6_message.h: idem
* ospf6_proto.h: idem
* ospf6_message.c
* ospf6_packet_minlen: helper array for ospf6_packet_examin()
* ospf6_lsa_minlen: helper array for ospf6_lsa_examin()
* ospf6_hello_recv(): do not call ospf6_header_examin(), let upper
layer verify the input data
* ospf6_dbdesc_recv(): idem
* ospf6_lsreq_recv(): idem
* ospf6_lsupdate_recv(): idem
* ospf6_lsack_recv(): idem
* ospf6_prefixes_examin(): new function, implements A.4.1
* ospf6_lsa_examin(): new function, implements A.4
* ospf6_lsaseq_examin(): new function, an interface to above
* ospf6_packet_examin(): new function, implements A.3
* ospf6_rxpacket_examin(): new function, replaces
ospf6_header_examin()
* ospf6_header_examin(): sayonara
* ospf6_receive(): perform passive interface check earliest possible,
employ ospf6_rxpacket_examin()
|
|
|
|
"mtu-ignore" is an option ospfd used to mimic from the vendor's
implementation, now ospf6d will also implement it.
* ospf6_interface.h: extend ospf6_interface structure by one flag
* ospf6_interface.c: (ipv6_ospf6_mtu_ignore, no_ipv6_ospf6_mtu_ignore):
new declarations; (ospf6_interface_create): show initial value for
consistency; (ospf6_interface_show): print flag status
* ospf6_message.c: (ospf6_dbdesc_recv): consider interface-specific flag
when checking MTU
|
|
A clean exit makes it easier to use memory debuggers.
* ospf6_asbr.c: (ospf6_asbr_terminate) Add a function to do route map
cleanup.
* ospf6_lsa.c: (ospf6_lsa_terminate) Add a function to cleanup the lsa
handler vector.
* ospf6_main.c: (ospf6_exit) Add an function that causes ospf6d to
gracefully exit.
* ospf6_message.c: (ospf6_message_terminate) Add a function that frees
the send and receive buffers.
* ospf6_top.c: (ospf6_delete) Enable the ospf6_delete() function.
Disable ospf6 before freeing everything.
|
|
|
|
2008-08-15 Paul Jakma <paul.jakma@sun.com>
* {ospf6d,ripngd}/*: Finish job of marking functions as static, or
exporting declarations for them, to quell warning noise with
Quagga's GCC default high-level of warning flags. Thus allowing
remaining, more useful warnings to be more easily seen.
|
|
2006-02-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
* valgrind check and memory fix
* route table identification string added
* ospf6d.h: version 0.9.7q
|
|
2005-10-20 Yasuhiro Ohara <yasu@sfc.wide.ad.jp>
* ospf6_neighbor.c: add the calling of ospf6_maxage_remove ()
when the neighbor went out of Exchange/Loading.
|
|
IP source address in the OSPF packets. It was sometimes problematic
in actual operation (needed some operational cost: restarting
all-neighbor routers when I/F NIC was changed). Due to this change,
a previously safe case, attaching multiple interface to the same
link will now be dengerous and will not work. Remedy to that should
be applied later.
[port from GNU Zebra]
|
|
* (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.
|
|
|
|
* ospf6_route.c: Add const qualifier to various char arrays of
constants. signed/unsigned fixes.
(ospf6_linkstate_table_show) argv is const
* ospf6_snmp.c: listnode typedef is dead.
(ospf6_snmp_init) Take struct thread_master arg, needed for
smux_init.
* ospf6_snmp.h: update ospf6_snmp_init declaration.
* ospf6d.c: (ospf6_init) add const qualifier to sargv, pass master
to ospf_snmp6_init.
* ospf6_asbr.c: const char update.
* ospf6_interface.c: ditto, plus signed/unsigned fixes.
(ipv6_ospf6_cost) Check whether cost fits in u_int32_t and use
strtoul.
* ospf6_intra.c: const char update. Parenthesise expression.
* ospf6_lsa.c: signed/unsigned and const char updates.
* ospf6_proto.c: ditto.
* ospf6_message.c: ditto.
* ospf6_lsdb.c: signed/unsigned update.
* ospf6_main.c: const char update.
* ospf6_neighbor.c: ditto.
* ospf6_spf.c: ditto.
* ospf6_top.c: ditto.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fixes.
|
|
zclient changes.
|
|
* ospf6d/ospf6_message.c: Change memcpy() to strcpy() to prevent
copying of extraneous junk - suggested by Anil Madhavapeddy
<anil@recoil.org> on bug-zebra@gnu.org.
|
|
|