Age | Commit message (Collapse) | Author |
|
Debian tried unsuccessfully to build with libpcreposix. This adds proper
support to autoconf/configure.ac for it.
Based on the patch by C.J. Adams-Collier in bug #483.
bgpd/bgp_{regex,routemap}.h: Pull in PCRE POSIX header if available.
|
|
|
|
|
|
|
|
|
|
Check result of daemon() call to fix warning
Make local variables static
|
|
|
|
|
|
Fix printf format warning and make capability table 'const static'
|
|
Message lists can be read-only, and hash tables are local to this
code.
|
|
The finite state machine table is immutable.
|
|
When a BGP instance is deleted with lots of routes and neighbors
it is possible for the peer rsclient queue to run after
bgp_delete has been called. This would lead to bgpd crashing,
see https://bugzilla.vyatta.com/show_bug.cgi?id=3436
The fix is to add reference counting to the BGP instance and defer
actual freeing until all references are gone.
This patch also fixes a memory leak where the self-reference
peer instance was being created but never freed.
The check in bgp_clear_route is no longer valid because it is possible
for it to be called when peer is in Deleted state during cleanup.
|
|
These variables are const.
|
|
The cmd_nodes used to configure vty, can mostly be static so
(basic data hiding 101).
|
|
Use Ansi-C prototypes rather than old K&R method of declaring
function without arguments
|
|
Simple conversion of XMALLOC/memset to XCALLOC
|
|
- aspath_gettoken(): use as_t to fix 4-byte ASN scanning (bug #484)
- set_aspath_prepend_cmd(): use CMD_AS_RANGE in message to match
actual range
- no_set_aspath_prepend_val_cmd(): idem
- set_aspath_exclude_cmd(): idem
- no_set_aspath_exclude_val_cmd(): idem
|
|
|
|
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.
|
|
* lib/workqueue.c: free-ing workqueues had never been tested obviously,
queue's thread was not being stopped
* bgpd/bgpd.c: null out freed workqueues, to prevent acting on freed
workqueues
|
|
|
|
* bgpd/bgp_community.c: (community_del_val) Fix bug in memcpy that was
using the wrong size on architectures where a pointer is not 32 bits.
|
|
When bgp calls getaddrinfo, it gets both ipv6 and ipv4 addresses.
Unless IPV6_ONLY is set on Linux, only the ipv6 bind will succeed,
and the IPV4 connections will come in as mapped connections on the
IPV6 socket.
|
|
* bgpd/bgp_aspath.c: (aspath_make_str_count) "assert (len < str_size)" was
getting hit under certain 4-byte ASN conditions. New realloc strategy.
* bgpd/bgp_aspath.c: (aspath_key_make) const warning fix.
"%d" -> "%u" 4-byte ASN corrections. Prevent negative number when ASN is
above 2^31.
|
|
* bgp_vty.c: (show_bgp_views_cmd) new command to list all defined
views.
(with small edits by Paul Jakma)
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
|
|
* bgp_route.c: (show_ip_bgp_view_rsclient_route_cmd) Add the missing "ip"
to the command string.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
* bgpd/bgp_packet.c: (bgp_open_receive) Try fix the little race in the FSM,
where a accept-peer that progress faster than realpeer gets closed down if
realpeer is still just in Connect, by allowing the realpeer to be
bgp_stop'ed and doing the regular swapping-of-FSM state.
|
|
* bgp_packet.c: (bgp_open_receive) the accept-peer hack can sometimes
cause a race between two peers that try to establish sessions to each other,
causing session setup to fail when it should have succeeded. In the worst
case, the race can 'loop', causing prolonged failure to establish sessions.
|
|
|
|
'remotes/jocke/snmp_crosscompile'
|
|
accepted conns"
Revert commit d664ae1182c29b74b409bc8594b7bd0575e91ce9. An experimental
patch which violates RFC4271 quite badly, but managed to accidently sneak
its way in.
|
|
--without-crypto
Autoconfig work by me, the rest was done by
"Kirill K. Smirnov" <lich@math.spbu.ru>
|
|
* lib/command.h: Add a RESTRICTED_NODE, intended for use with
anonymous, 'no login' vtys, to provide a subset of 'view' mode
commands.
* lib/command.c: Add RESTRICTED_NODE bits, nothing special, just
following VIEW_NODE.
* lib/vty.c: (vty_auth) enable authentication should fall back to
restricted/view node as appropriate.
(vty_create) init vty's to restricted/view node as appropriate,
for the 'no login' case.
(vty_{no_,}restricted_mode_cmd) config commands to enable
'anonymous restricted' in vty configuration.
(vty_config_write) 'anonymous restricted' config.
(vty_init) Install some commands to restricted mode, and the
'anonymous restricted' config commands into VTY_NODE.
* bgpd/*.c: Install some of the safe(r) BGP commands into
'restricted mode', i.e. lookup commands of non-sensitive data.
Useful with looking-glass route-servers.
|
|
- Add more stuff, archive libraries, etc..
|
|
|
|
|
|
2008-08-17 Stephen Hemminger <stephen.hemminger@vyatta.com>
* bgp_damp.?: (bgp_config_write_damp) remove useless check
of statically allocated config storage, and useless return
value
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
2008-08-15 Paul Jakma <paul.jakma@sun.com>
* */*: Fix various problems flagged by Sun Studio compiler.
- '<qualifier> <storage>' obsolescent in declarations
- empty statements (';' after ALIAS definitions)
- implicit declarations (e.g printstack in lib/log.c)
- "\%" in printf string instead of "%%"
- loops that return on the first iteration (legitimately, but
compiler can't really know), e.g. bgp_routemap.c
- internal declarations which mask prototypes.
|
|
2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com>
* lib/log.{c,h}: struct message argument should point to const
* */*.c: adjust to suit,
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
2008-08-14 Stephen Hemminger <stephen.hemminger@vyatta.com>
* lib/hash.h: (struct hash) Hash comparator callback really
ought to treat storage behind arguments as constant - a compare
function with side-effects would be evil.
* */*.c: Adjust comparator functions similarly, thus fixing at least
a few compiler warnings about const qualifier being dropped.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
2008-08-13 Paul P Komkoff Jr <i@stingr.net>
* configure.ac: add a configure flag and autoconf macro, which will
determine if your toolchain supports PIE.
* */Makefile.am: add corresponding CFLAGS and LDFLAGS into
appropriate places.
Signed-off-by: Paul Jakma <paul@quagga.net>
|
|
2007-08-31 Paul Jakma <paul.jakma@sun.com>
* (general) Add 'bgp open-accept' option, to allow bgpd to send OPEN
on accepted connections, i.e. to not wait till after
collision-detect to send OPEN, which appears to be allowed in
RFC4271. This may help speed up establishing sessions, or help
avoid FSM problems with sessions to certain peers. Not enabled by
default though.
|
|
|
|
2008-07-22 Paul Jakma <paul.jakma@sun.com>
* HACKING: Document preference for compiler conditional code, over
cpp conditional.
* configure.ac: DISABLE_BGP_ANNOUNCE always should be defined.
* bgp_{packet,route,advertise}.c: change to compiler testing of
DISABLE_BGP_ANNOUNCE, rather than cpp.
2008-07-22 MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp>
* bgp_packet.c: (bgp_update_packet_eor) Fix crash triggerable
if a bgpd was compiled with --disable-bgp-announce and if GR is
advertised by peer.
|
|
2008-07-22 Paul Jakma <paul.jakma@sun.com>
* bgp_community.c: (community_str2com) assigns defaults to local
vars
* bgp_attr.c: (bgp_attr_parse) match format specifier to arg
* bgp_table.{c,h}: (bgp_table_top) can take a * to a const, quelling
warning in bgp_route.c
|
|
2008-07-21 Paul Jakma <paul.jakma@sun.com>
* bgp_packet.c: (bgp_open_receive) fix warning in a zlog call
* bgp_vty.c: (bgp_vty_return) add return code
* bgpd.c: (bgp_master_init) setup the socket list.
* bgp_network.c: Remove the dual IPv4/6 socket thing for now, which
was implemented by Michael, until such time as its clear its
required for Linux (see sockopt comments). IPv6 support, including
IPv4 sessions on AF_INET6 sockets, therefore is broken, and the
'-l 0.0.0.0' arguments would need to be given to bgpd to make
things work here.
2008-07-21 Michael H. Warfield <mhw@wittsend.com>
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Tomohiko Kusuda <kusuda@inetcore.com>
Leigh Brown <leigh@solinno.co.uk>
* bgp_network.c: (bgp_md5_set_one) shim between libzebra tcp-md5
sockopt and bgpd.
(bgp_md5_set_socket) Helper for bgp_connect
(bgp_md5_set) setup TCP-MD5SIG for the given peer.
(bgp_connect) call out to bgp_md5_set_socket for the outgoing
connect socket.
(bgp_socket) save references to the listen sockets, needed if
TCP-MD5SIG is applied later or changed.
* bgp_vty.c: (*neighbor_password_cmd) New 'neighbor ... password'
commands.
* bgpd.c: (peer_{new,delete) manage TCP-MD5 password
(peer_group2peer_config_copy) inherit TCP-MD5 password
(peer_password_{un,}set) orchestrate the whole add/remove of TCP-MD5
passwords: applying checks, stopping peers, and trying to return
errors to UI, etc.
(bgp_config_write_peer) save password.
Fix missing newline in writeout of neighbor ... port.
2008-07-21 Paul Jakma <paul.jakma@sun.com>
* sockunion.c: ifdef out various places that converted
v4mapped sockets to pure v4. Doesn't seem necessary at all,
presumably a workaround for now historical inet_ntop bugs (?)
2008-07-21 Michael H. Warfield <mhw@wittsend.com>
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
* sockopt.{c,h}: (sockopt_tcp_signature) Add TCP-MD5SIG support.
|
|
2008-07-02 MIYAJIMA Mitsuharu <miyajima.mitsuharu@anchor.jp>
* *.c: CMD_AS_RANGE was being used inside command strings, and thus
not being expanded, fix by dequoting.
|
|
2008-07-02 Stephen Hemminger <stephen.hemminger@vyatta.com>
* bgp_table.{c,h}: (bgp_table_finish) Take a double pointer and
scrub pointer in caller, so fixing double-free crashes seen
with route-server-client configuration.
* *.c: Adjust all callers of bgp_table_finish
2008-07-02 Paul Jakma <paul.jakma@sun.com>
* bgp_table.{c,h}: (bgp_node_delete, bgp_table_free) shouldn't be
exported.
|
|
2008-06-07 Paul Jakma <paul@jakma.org>
* bgp_attr.{c,h}: (bgp_mp_{un,}reach_parse) export, for unit tests.
* bgp_attr.c: (bgp_mp_reach_parse) Add logging. Tighten length test
to bounds check against the attribute length rather than the
stream length..
|