Age | Commit message (Collapse) | Author |
|
smux_trap() signature has been changed to provide appropriate level
information to send SNMPv2 notifications. This includes the addition
of the enterprise OID to use (from which is derived the SNMP trap OID)
and the MIB registry to locate the appropriate function for variable
bindings provided by the trap.
The SMUX implementation has been updated but ignore the provided
enterprise OID. Instead, it still uses the SMUX peer OID to keep
compatibility with previous versions of Quagga. The SMUX
implementation also ignores the provided MIB registry since it uses
smux_get() function to grab the appropriate values. This is not
possible with the AgentX implementation since there is no such
function provided by NetSNMP.
|
|
This element was not unused.
|
|
smux_trap() contains an argument whose use appears to be to set
sysUpTime.0/timestamp field in SNMP trap. However, this value is not
used in smux_trap(). Moreover, it is expected that this field is the
value of sysUpTime.0 when the trap was sent and not any other time
related to the trap. To avoid any confusion, we remove this field from
the signature of the function.
|
|
NetSNMP is the only SNMP implementation for Quagga. We don't need two
different symbols.
|
|
BGP uses time() to get system time of day; but that value
fluctuates with time adjustments from NTP. This can cause premature
flapping of peer sessions and other failures.
Use the system monotonic clock supported by Quagga thread library
to avoid issue.
See: http://bugzilla.vyatta.com/show_bug.cgi?id=4467
* bgpd/bgp_fsm.c
* bgp_uptime_reset(): dismiss function
* bgpd/bgpd.c
* bgp_clock(): new function
* bgpd/bgp_damp.c
* bgp_reuse_timer(): employ bgp_clock() instead of time(NULL)
* bgp_damp_withdraw(): idem
* bgp_damp_update(): idem
* bgp_damp_scan(): idem
* bgp_damp_info_vty(): idem
* bgp_damp_reuse_time_vty(): idem
* bgpd/bgp_fsm.c
* bgp_routeadv_timer(): idem
* bgp_stop(): idem
* bgp_establish(): idem
* bgpd/bgp_packet.c
* bgp_update_receive(): idem
* bgpd/bgp_route.c
* bgp_update_rsclient(): idem
* bgp_update_main(): idem
* bgp_static_update_rsclient(): idem
* bgp_static_update_main(): idem
* bgp_static_update_vpnv4(): idem
* bgp_aggregate_route(): idem
* bgp_aggregate_add(): idem
* bgp_redistribute_add(): idem
* bgpd/bgp_snmp.c
* bgpPeerTable(): idem
* bgpTrapEstablished(): idem
* bgpTrapBackwardTransition(): idem
* bgpd/bgpd.c
* peer_create(): idem
* peer_uptime(): idem
* bgp_master_init(): idem
|
|
Use Ansi-C prototypes rather than old K&R method of declaring
function without arguments
|
|
Compiled on 32-bit and 64-bit linux gcc 4.1.2 platforms.
No run-time testing on 32-bit and limited run-time testing on 64-bit.
|
|
--without-crypto
Autoconfig work by me, the rest was done by
"Kirill K. Smirnov" <lich@math.spbu.ru>
|
|
2007-05-03 Paul Jakma <paul.jakma@sun.com>
* bgp_route.h: (struct info) Move less frequently used
fields to a lazily allocated struct info_extra.
Export bgp_info_extra_get
* bgp_route.c: (bgp_info_extra_new) allocate extra
(bgp_info_extra_free) Free damp info and the info_extra.
(bgp_info_extra_get) Retrieve the info_extra of a struct
info, allocating as required.
(generally) adjust to use info->extra
* bgp_damp.c: (generally) use bgp_info_extra_get to access
dampinfo
* bgp_attr.h: Move rarely allocated attributes from struct attr
to a struct attr_extra, for a substantial saving in size of
struct attr.
* bgp_attr.c: (bgp_attr_extra_{new,free}), new, self-explanatory.
(bgp_attr_extra_get) Get the attr_extra for a given struct
attr, allocating it if needs be.
(bgp_attr_dup) Shallow copy the struct attr and its attr_extra.
(generally) adjust to know about attr->extra.
* bgp_debug.c: (bgp_dump_attr) ditto
* bgp_vty.c: (show_bgp_memory) print attr and info extra sizes.
* bgp_nexthop.c: (generally) adjust to know about attr->extra
and info->extra.
* bgp_{packet,routemap,snmp,zebra}.c: ditto
* lib/memtypes.c: Add MTYPE_ATTR_EXTRA and MTYPE_BGP_ROUTE_EXTRA
|
|
* Makefile.am: bgpd shouldn't list libgp's sources as its own.
Use LDADD.
* bgp_aspath.h:
(struct assegment) New struct, abstract representation of a
list of AS_PATH segments and the contained ASNs.
(struct aspath) Remove the raw-data related
fields, reference the abstract struct assegment instead.
Remove several other computed fields, it's just a
headache to maintain them and they're cheap to compute from
struct assegment.
(aspath_parse) parse a stream, not a pointer to raw data.
(aspath_count_{hops,confeds,size}) helpers to access
information formerly directly contained in struct aspath.
(aspath_snmp_pathseg) Helper for SNMP, BGP MIB wants
to be able to output hex representation of raw data.
* bgp_aspath.c: (general) partial-rewrite. Store aspath data
as an abstract singly-linked list of abstract segments,
rather than storing the raw data, and parsing it each and
every time. Remove several count/size fields which are cheap
to compute from the abstract segment structure.
(global) Include stream.h, needed for aspath_parse, and
others. Couple of helper macros added.
(struct assegment_header) Just the header, and only the
header.
(assegment_data_{new,free}) convenience functions for
AS_SEG_DATA allocation, the dynamic, per-segment array of
ASNs.
(assegment_{new,free,free_all,dup,dup_all}) convenience
functions for creating struct assegments. The _all forms will
follow the entire chain of segments from the given segment.
(assegment_prepend_asns) new function, prepend an ASN N times
to segment.
(assegment_append_asns) Append a list (array) of ASNs to
segment.
(int_cmp) convenience function for the aspath hash.
(assegment_normalise) new function. Normalise the given
segment chain to meet expectations of Quagga, and to
eliminate differing raw representations of the same paths.
Merge 'runs' of SEQUENCEs into one segment as our internal
segment is not limited by the protocol AS_PATH segment
length. Sort ASNs in SETs.
(aspath_new) Take void argument to quell warnings. Use the
assegment convenience functions.
(assegment_count_{asns,confeds,hops}) new functions to
compute at runtime values previously held in struct aspath.
(aspath_size) ditto.
(aspath_make_str_count) rewritten to stringify new
representation, and to be slightly easier to understand
hopefully.
(aspath_str_update) convenience function, update the aspath
str. Should investigate removing maintained string from
struct aspath, just run-time compute it, as per other fields.
It's just a maintenance headache, would save noticeable
amount of RAM with possibly not much extra run-time cost.
(aspath_dup) use the assegment dup functions.
(aspath_hash_alloc) Take void * argument to satisfy gcc. Use
the proper helper functions to dup data.
(assegments_parse) new function. parse raw AS_PATH data into
struct assegments. Normalise and return the head of the list.
(aspath_parse) Parse a stream, not pointer to raw data and
use assegments_parse to do it.
(assegment_data_put) Write out a single segment data in protocol
form to stream.
(assegment_header_put) ditto but for segment header.
(aspath_put) new function. As per previous but for an entire
struct aspath.
(aspath_snmp_pathseg) wrapper around aspath_put for
bgp_snmp.c. Uses a static buffer sadly.
(aspath_aggregate_as_set_add) rewritten to use assegments.
(aspath_aggregate) ditto
(aspath_{firstas,loop,private_as}_check) ditto
(aspath_{merge,prepend,add_one_as}) ditto
(aspath_cmp_left{_confed}) ditto
(aspath_delete_confed_seq) ditto, plus fixed to properly
delete all leading confed segments.
(aspath_as_add) Just use assegment_append_asns.
(aspath_segment_add) updated to use assegments.
(enum as_token) Add values for confeds
(aspath_gettoken) Add support for confeds
(aspath_str2aspath) ditto
(aspath_key_make) updated to use as_segments. Also, add
segment type into the hash value as appropriate.
(aspath_cmp) updated to use as_segments.
(aspath_print) don't segfault on NULL argument.
* bgp_attr.c: (bgp_attr_aspath) aspath_parse wants the stream
now. No need for manual forwarding of stream.
(bgp_packet_attribute) empty aspath is now denoted by NULL
segment field, length is gone.
Use aspath_size() to determine size.
(bgp_attr_init) Fix declaration, explicitely specify void
arg.
(bgp_dump_routes_attr) Use aspath_size() to determine size.
* bgp_route.c: (bgp_info_cmp) use the aspath_count_* functions.
(bgp_rib_withdraw) remove unused variable. Use
aspath_count_hops.
* bgp_snmp.c: (bgp4PathAttrTable) raw data is gone, use
aspath_snmp_pathseg to get the representation.
|
|
* (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.
|
|
draft - ie. "neighbor version 4-" commands. Preserve dummy "neighbor
version" command as deprecated.
[merge from GNU Zebra]
|
|
* bgpd.[ch], bgp_nexthop.c, bgp_snmp.c: Remove useless bgp_get_master()
function.
* bgp_packet.c: MP AFI_IP update and withdraw parsing.
* bgp_fsm.c: Reset peer synctime in bgp_stop(). bgp_fsm_change_status()
is better place to log about peer status change than bgp_event().
Log in bgp_connect_success().
* bgp_vty.c: Fix typo in comment.
* bgp_attr.c: Better log about unknown attribute.
[merge from GNU Zebra]
|
|
initializes connection, and "no smux peer" command terminates it. Fixes
bugzilla #47 and #112.
|
|
* (global) more const'ification and fixups of types to clean up code.
* bgp_mplsvpn.{c,h}: (str2tag) fix abuse. Still not perfect,
should use something like the VTY_GET_INTEGER macro, but without
the vty_out bits..
* bgp_routemap.c: (set_aggregator_as) use VTY_GET_INTEGER_RANGE
(no_set_aggregator_as) ditto.
* bgpd.c: (peer_uptime) fix unlikely bug, where no buffer is
returned, add comments about troublesome return value.
|
|
* Fix lib/smux.c's reliance on daemons exporting struct
thread_master *master.
|
|
|
|
* Sync to Zebra CVS
* Fix lib/thread.h leak
* Fix small Opaque LSA leak
* Do not configure OSPF interfaces for secondary addresses
* vtysh fixes from Hasso
* Dave Watson's missing ntohs fix
|
|
|
|
|