Age | Commit message (Collapse) | Author |
|
ripd had a check to restrict metric 0 to only directly connected routes.
This check was implemented by checking against Connected as route type.
This is, however, incorrect -- all routes that directly use an interface
without a nexthop should be treated as directly connected and passed off
with metric 0.
ripngd does not posess such a check and was not touched.
Reported-by: Sean Fulton <sean@gcnpublishing.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
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>
|
|
ripd_create_socket() failed in bind() on Mac OS X 10.7 since there was garbage
in unused fields of struct sockaddr_in.
* ripd/ripd.c: zero out struct sockaddr_sin from before filling.
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
|
|
Most table handlers do not expect to be given an OID whose prefix is
outside what they can handle. This is not a problem with the SMUX
implementation since it always correct the OID such that the prefix
matches. However, this is not the case for the AgentX
implementation. A new function, smux_header_table() is used to do this
normalization.
|
|
The correct method to link to NetSNMP is to use net-snmp-config (which
is like pkg-config). Explicit link to libcrypto is also dropped
(NetSNMP libs are linked to libcrypto, no need to link Quagga to
it). Moreover, @SNMP_INCLUDES@ is dropped because useless. Due to a
bug in configure.ac, it was properly populated.
|
|
NetSNMP is the only SNMP implementation for Quagga. We don't need two
different symbols.
|
|
Some .h files in lib/ are autogenerated. The search path should
include the build directory and the source directory. They usually
match but sometimes, they may be different. For example:
$ mkdir build
$ cd build
$ ../configure
$ make
|
|
|
|
The previous commits modified both zebra and bgpd for additional
SAFI field, but not any other routing daemon, which led to zebra
daemon crashing with failed assertion.
|
|
|
|
All daemons modified to support custom path to zserv
socket.
lib: generalize a zclient connection
zclient_socket_connect added. zclient_socket and
zclient_socket_un were hidden under static expression.
"zclient_serv_path_set" modified.
|
|
* sockopt.[ch] (setsockopt_ipv4_multicast): ifindex is now mandatory (all
non-ancient OSes can use it anyway), and if_addr parameter (the address
of the interface) is now gone. (setsockopt_ipv4_multicast_if):
IP_MULTICAST_IF processing moved to this new function
* ospf_network.c (ospf_if_add_allspfrouters, ospf_if_drop_allspfrouters,
ospf_if_add_alldrouters, ospf_if_drop_alldrouters, ospf_if_ipmulticast),
rip_interface.c (ipv4_multicast_join, ipv4_multicast_leave,
rip_interface_new): adapt to the new interface
|
|
...A nasty bug, if you forgot to disable debugging, stored the config
and reboot your machine - if you really depend on ripd, then the machine
will not fully come back on the network, because ripd fails.
|
|
* ripd/rip_interface.c
* rip_request_neighbor(): comment out, unused
* rip_request_neighbor_all(): idem
* rip_interface_up(): Cast flags otherwise compiler complains
about %lld not matching uint64_t on 64 bit x86. Print in hex
since flags are bit field.
* rip_interface_add(): idem
* rip_interface_delete(): idem
* ripd/rip_zebra.c
* rip_redistribute_set(): comment out, unused
* ripd/ripd.h
* rip_redistribute_check(): move prototype here so compiler
can check function against prototype
* ripd/ripd.c
* rip_update_default_metric(): comment out, unused
|
|
* */*main.c: (main) Current versions of Gcc warn if the return value for
daemon() is not checked. So add a simple test and exit on failure.
|
|
*/*: ifp->flags is 64 bit unsigned which can not be handled by %l on 32
bit architectures - requires %ll and the appropriate cast.
|
|
* ripd.c: (rip_create_socket) RIP packets should go out with Type Of Service
(DSCP) set to Internet control (like OSPF and BGP).
|
|
Vyatta Bug 3999
|
|
The cmd_nodes used to configure vty, can mostly be static so
(basic data hiding 101).
|
|
Simple conversion of XMALLOC/memset to XCALLOC
|
|
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.
|
|
Fix a potential problem (most probably not triggering a real problem, at
least on Linux). When an interface goes down and ripd tries to delete the
corresponding route it errorneously passes the interface's index instead of
the metric to zebra.
|
|
--without-crypto
Autoconfig work by me, the rest was done by
"Kirill K. Smirnov" <lich@math.spbu.ru>
|
|
- Add more stuff, archive libraries, etc..
|
|
|
|
|
|
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-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>
|
|
|
|
2008-05-29 Stephen Hemminger <stephen.hemminger@vyatta.com>
* ripd.c: (rip_auth_md5) fix bogus empty string test
|
|
2008-05-29 Martin Nagy <mnagy@redhat.com>
* */*main.c: Sanity check port numbers before using.
|
|
2008-03-13 Paul Jakma <paul.jakma@sun.com>
* ripd.c/rip_interface.c: Remove 0 entries from rip_msg
ri_version_msg struct message's, not needed with recent fixes
to mes_lookup.
|
|
2007-05-09 Paul Jakma <paul.jakma@sun.com>
* configure.ac: sys/conf.h depends on sys/param.h, at least on
FBSD 6.2.
(bug #363) Should check for in_pktinfo for IRDP
2006-05-27 Paul Jakma <paul.jakma@sun.com>
* configure.ac: General cleanup of header and type checks, introducing
an internal define, QUAGGA_INCLUDES, to build up a list of
stuff to include so as to avoid 'present but cant be compiled'
warnings.
Misc additional checks of things missing according to autoscan.
Add LIBM, for bgpd's use of libm, so as to avoid burdening
LIBS, and all the binaries, with libm linkage.
Remove the bad practice of using m4 changequote(), just
quote the []'s in the case statements properly.
This should fix bugs 162, 303 and 178.
* */*.{c,h}: Update all HAVE_* to the standard autoconf namespaced
HAVE_* defines. I.e. HAVE_SA_LEN -> HAVE_STRUCT_SOCKADDR_SA_LEN,
* bgpd/Makefile.am: Add LIBM to bgpd's LDADD, for pow().
|
|
2007-04-27 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripd/ripd.c: (rip_vty_out_uptime) Remove unused variable timer_now.
* ripngd/ripngd.c: (ripng_vty_out_uptime) Remove unused variable
timer_now.
|
|
thread_timer_remain_second)
|
|
2007-03-21 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripd.c: (show_ip_rip_status) Use new thread_timer_remain_second
function instead of rip_next_thread_timer to display the time until
next update properly.
(rip_next_thread_timer) Remove obsolete function.
|
|
2006-12-12 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* if.h: (struct connected) Add new ZEBRA_IFA_PEER flag indicating
whether a peer address has been configured. Comment now shows
the new interpretation of the destination addr: if ZEBRA_IFA_PEER
is set, then it must contain the destination address, otherwise
it may contain the broadcast address or be NULL.
(CONNECTED_DEST_HOST,CONNECTED_POINTOPOINT_HOST) Remove obsolete
macros that were specific to IPv4 and not fully general.
(CONNECTED_PEER) New macro to check ZEBRA_IFA_PEER flag.
(CONNECTED_PREFIX) New macro giving the prefix to insert into
the RIB: if CONNECTED_PEER, then use the destination (peer) address,
else use the address field.
(CONNECTED_ID) New macro to come up with an identifying address
for the struct connected.
* if.c: (if_lookup_address, connected_lookup_address) Streamline
logic with new CONNECTED_PREFIX macro.
* prefix.h: (PREFIX_COPY_IPV4, PREFIX_COPY_IPV6) New macros
for better performance than the general prefix_copy function.
* zclient.c: (zebra_interface_address_read) For non-null destination
addresses, set prefixlen to equal the address prefixlen. This
is needed to get the new CONNECTED_PREFIX macro to work properly.
* connected.c: (connected_up_ipv4, connected_down_ipv4,
connected_up_ipv6, connected_down_ipv6) Simplify logic using the
new CONNECTED_PREFIX macro.
(connected_add_ipv4) Set prefixlen in destination addresses (required
by the CONNECTED_PREFIX macro). Use CONNECTED_PEER macro instead
of testing for IFF_POINTOPOINT. Delete invalid warning message.
Warn about cases where the ZEBRA_IFA_PEER is set but no
destination address has been supplied (and turn off the flag).
(connected_add_ipv6) Add new flags argument so callers may set
the ZEBRA_IFA_PEER flag. If peer/broadcast address satisfies
IN6_IS_ADDR_UNSPECIFIED, then reject it with a warning.
Set prefixlen in destination address so CONNECTED_PREFIX will work.
* connected.h: (connected_add_ipv6) Add new flags argument so
callers may set the ZEBRA_IFA_PEER flag.
* interface.c: (connected_dump_vty) Use CONNECTED_PEER macro
to decide whether the destination address is a peer or broadcast
address (instead of checking IFF_BROADCAST and IFF_POINTOPOINT).
* if_ioctl.c: (if_getaddrs) Instead of setting a peer address
only when the IFF_POINTOPOINT is set, we now accept a peer
address whenever it is available and not the same as the local
address. Otherwise (no peer address assigned), we check
for a broadcast address (regardless of the IFF_BROADCAST flag).
And must now pass a flags value of ZEBRA_IFA_PEER to
connected_add_ipv4 when a peer address is assigned.
The same new logic is used with the IPv6 code as well (and we
pass the new flags argument to connected_add_ipv6).
(if_get_addr) Do not bother to check IFF_POINTOPOINT: just
issue the SIOCGIFDSTADDR ioctl and see if we get back
a peer address not matching the local address (and set
the ZEBRA_IFA_PEER in that case). If there's no peer address,
try to grab SIOCGIFBRDADDR regardless of whether IFF_BROADCAST is set.
* if_ioctl_solaris.c: (if_get_addr) Just try the SIOCGLIFDSTADDR ioctl
without bothering to check the IFF_POINTOPOINT flag. And if
no peer address was found, just try the SIOCGLIFBRDADDR ioctl
without checking the IFF_BROADCAST flag. Call connected_add_ipv4
and connected_add_ipv6 with appropriate flags.
* if_proc.c: (ifaddr_proc_ipv6) Must pass new flags argument to
connected_add_ipv6.
* kernel_socket.c: (ifam_read) Must pass new flags argument to
connected_add_ipv6.
* rt_netlink.c: (netlink_interface_addr) Copy logic from iproute2
to determine local and possible peer address (so there's no longer
a test for IFF_POINTOPOINT). Set ZEBRA_IFA_PEER flag appropriately.
Pass new flags argument to connected_add_ipv6.
(netlink_address) Test !CONNECTED_PEER instead of if_is_broadcast
to determine whether the connected destination address is a
broadcast address.
* bgp_nexthop.c: (bgp_connected_add, bgp_connected_delete)
Simplify logic by using new CONNECTED_PREFIX macro.
* ospf_interface.c: (ospf_if_is_configured, ospf_if_lookup_by_prefix,
ospf_if_lookup_recv_if) Simplify logic using new CONNECTED_PREFIX
macro.
* ospf_lsa.c: (lsa_link_ptop_set) Using the new CONNECTED_PREFIX
macro, both options collapse into the same code.
* ospf_snmp.c: (ospf_snmp_if_update) Simplify logic using new
CONNECTED_ID macro.
(ospf_snmp_is_if_have_addr) Simplify logic using new CONNECTED_PREFIX
macro.
* ospf_vty.c: (show_ip_ospf_interface_sub) Use new CONNECTED_PEER macro
instead of testing the IFF_POINTOPOINT flag.
* ospfd.c: (ospf_network_match_iface) Use new CONNECTED_PEER macro
instead of testing with if_is_pointopoint. And add commented-out
code to implement alternative (in my opinion) more elegant behavior
that has no special-case treatment for PtP addresses.
(ospf_network_run) Use new CONNECTED_ID macro to simplify logic.
* rip_interface.c: (rip_interface_multicast_set) Use new CONNECTED_ID
macro to simplify logic.
(rip_request_interface_send) Fix minor bug: ipv4_broadcast_addr does
not give a useful result if prefixlen is 32 (we require a peer
address in such cases).
* ripd.c: (rip_update_interface) Fix same bug as above.
|
|
syntax
2006-10-04 Oliver Hookins <ohookins@gmail.com>
* bgpd/bgp_main.c: Add configuration check option, with
'-C' rather than '-c' for consistency between daemons.
* isisd/isis_main.c: ditto
* ospf6d/ospf6_main.c: ditto
* ospfd/ospf_main.c: ditto
* ripngd/ripng_main.c: ditto
* vtysh/vtysh_main.c: ditto
* ripd/rip_main.c: Change the config check option to
'-C' and tidy up the code.
* zebra/main.c: ditto
2006-10-04 Stergiakis Alexandros <astergiakis@antcor.com>
* ripd/rip_main.c: This trivial patch introduces a new
command-line option '-c', which instructs zebra/ripd
to check its configuration file for validity, print
any error message, and then exit. This is useful when
the configuration file is edited by hand or otherwise,
and you simply want to validate it without any other
effect.
* zebra/main.c: ditto
|
|
2006-09-11 Paul Jakma <paul.jakma@sun.com>
* rip_routemap.c: (route_set_metric) underflow check needs to
use signed, problem identified and diagnosed by Pavel
Nikiforov in bug #293.
|
|
2006-09-11 Paul Jakma <paul.jakma@sun.com>
* ripd.c: (rip_read) remove gratuitous use of mid-function
declaration of vrecv, bug #278.
|
|
2006-06-29 Paul Jakma <paul.jakma@sun.com>
* rip_zebra: (general) convert redistribute commands to use
the auto-generated defines.
|
|
2006-05-04 Paul Jakma <paul.jakma@sun.com>
* (general) Fixes for bugs #261 and 262. Thanks to
Konstantin V. Gavrilenko <kos@arhont.com> for the problem
reports, testing of a series of proposed patches and comment
on the proposed changes in behaviour.
* rip_interface.c: (ip_rip_authentication_mode_cmd) Parse all
of the command before making any changes to configured state.
* ripd.c: (rip_read) RIP version control should be absolute and
always apply, fixes bug #261 by allowing RIPv1 to be disabled.
Fix bug #262: If authentication is enabled, then
unauthenticated packets should not be accepted. We do however
make an exception for RIPv1 REQUEST packets, to which we will
reply as RIPv1 can now be disabled fully, to allow ripd to
still provide routing /information/ to simple devices.
|
|
2006-04-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* ripd.c: (rip_update_process) Try to fix the logic for sending
an updated on each connected network. The new code will
attempt to send the update on each connected network, whereas
the previous code seemed to be attempting to avoid sending
more than one RIPv1 update on a given interface, but was coded
incorrectly. The actual effect of the old code was to send
an update only on the first connected address in the cases
where the interface is not multicast, or RIPv2 is not being used.
|
|
over connected routes
|
|
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.
|
|
2006-01-17 Paul Jakma <paul.jakma@sun.com>
* ripd.c: (rip_auth_md5) remove pdigest, not needed.
Use a local buffer for the auth_str, where it can be properly
nul padded. Do so, hence fixing MD5 authentication.
Key looked up via key ring should be used in preference to
the RIPv1 simple password, not other way around.
No need to copy around digests, we can reference them
directly.
The auth_len received can't be trusted, some implementations
lie (e.g. older ripd).
(rip_auth_md5_ah_write) rename len local variable to doff
to be consistent with other functions.
(rip_auth_header_write) add the missing return.
(rip_auth_md5_set) use the proper constructs to access stream.
|
|
* ripd.c: (rip_response_process) Instead of calling
rip_interface.c:if_valid_neighbor(), call the equivalent
library function if_lookup_address().
* rip_interface.c: (if_valid_neighbor) Remove function, since it is
essentially equivalent to the if_lookup_address() library function.
* ripd.h: (if_valid_neighbor) Remove function declaration.
|
|
* Makefile.am: Add rip_interface.h, or else it doesn't get
included in dists.
|
|
* ripd.c: Update couple more functions to specify void
explicitely.
|
|
* (general) static/extern functions and definitions.
* rip_interface.h: new file, export the public functions from
rip_interface.c
|