summaryrefslogtreecommitdiffstats
path: root/zebra/rt_socket.c
Commit message (Collapse)AuthorAgeFilesLines
* zebra: Fix route deletion on *BSDTimo Teräs2016-03-081-22/+21
| | | | | | | | | Fix for not handling RTM_CHANGE correctly. This patch change it to delete/add instead. Using RTM_CHANGE on kernels where it works is better, but is left as an exercise for developer who has access and will to fix it on *BSD. [ed note: collaboration with Martin Winter]
* *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-02-261-2/+2
|
* zebra: atomic FIB updatesTimo Teräs2016-02-261-48/+26
| | | | | | | | | | | This commit updates the kernel API so that route changes are atomically updated using change/replaces messages instead of first sending a withdraw followed with update. Same for zclient updates, changes are sent as single ADD instead of DELETE + ADD. Signed-off-by: Timo Teräs <timo.teras@iki.fi>
* zebra/rt_socket: Fix warningsDavid Lamparter2015-10-161-0/+6
| | | | | | Fix warning about unused sin_masklen / sin6_masklen Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: use prefix2str for logging where possibleTimo Teräs2015-06-011-11/+9
| | | | | | | This makes code more robust, consice and readable. Signed-off-by: Timo Teräs <timo.teras@iki.fi> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: remove unused netlink_route()/kernel_rtm_ipv6()David Lamparter2015-04-211-61/+0
| | | | | | | | kernel_delete_ipv6_old(), removed in 51bdeba a little while ago, was the last user of netlink_route() and kernel_rtm_ipv6(). Everything else uses the _multipath variants of these functions. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: remove kernel_delete_ipv6_old()David Lamparter2015-02-141-16/+0
| | | | | | | | | | The only user of this was rib_bogus_ipv6(), which was removed in the previous commit. Good riddance. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* build: remove INRIA, NRL and MUSICA IPv6 quirksDavid Lamparter2015-02-141-5/+0
| | | | | | | | | Valar dohaeris. Signed-off-by: David Lamparter <equinox@opensourcerouting.org> Acked-by: Greg Troxel <gdt@ir.bbn.com> Acked-by: Feng Lu <lu.feng@6wind.com> Acked-by: Paul Jakma <paul@jakma.org>
* zebra: apply syntactic sugar to rib_dump()David Lamparter2014-04-011-1/+1
| | | | | | | strip the explicit __func__ present on all calls and make the prefix argument a transparent union. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* zebra: rework recursive route resolutionChristian Franke2013-09-191-62/+36
| | | | | | | | | | | | | | | Change the datastructure for recursive routes. This brings the following benefits: By using struct nexthop also to store nexthops obtained by recursive resolution, we can get rid of quite a bit of code duplication in the fib management. (rt_netlink, rt_socket, ...) With the new datastructure we can make use of all available paths when recursive routes are resolved with multipath routes. Signed-off-by: Christian Franke <chris@opensourcerouting.org> Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* Switch from LOOKUP() to lookup() for rtm_type (see bug #401 for details).Denis Ovsienko2007-09-141-2/+2
|
* * rt_socket.c: (kernel_rtm_ipv4) prefix_buf could be passedDenis Ovsienko2007-09-121-0/+3
| | | | to zlog_err() uninitialized with debug disabled. Fixed.
* Merged own patch for the bug #391 (debugging and comments mostly).Denis Ovsienko2007-08-131-23/+60
|
* Add comment questioning part of previous change (Denis?).Greg Troxel2007-08-021-26/+31
| | | | Fix indentation to match accumulated changes.
* Bugzilla #384.Greg Troxel2007-08-021-8/+7
| | | | | | | | | | | 2007-08-02 Denis Ovsienko * rt_socket.c (kernel_rtm_ipv4): Only call rtm_write when changes are intended. Don't set FIB flag on failed additions (such as occur with multiple paths. http://bugzilla.quagga.net/attachment.cgi?id=235&action=view
* [autoconf] bugs 162,303,178: Fix 'present but can not be compiled' warningsPaul Jakma2007-05-101-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | 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().
* 2005-12-29 Greg Troxel <gdt@fnord.ir.bbn.com>gdt2005-12-291-1/+1
| | | | | * rt_socket.c (kernel_rtm_ipv4): Use AF_INET rather than AF_UNSPEC for mask. From David Young.
* [zebra] fix some small compile errors, mark several functions staticpaul2005-11-231-14/+11
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* [solaris] Extra debug and cross-checks for kernel_socket, two Sol9 fixes.paul2005-11-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* 2004-12-07 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-12-071-2/+2
| | | | * *.c: Change level of debug messages to LOG_DEBUG.
* Many warning fixes from PC Drew ([quagga-dev 940]) and removing using PAGERhasso2004-03-041-1/+1
| | | | from vtysh ([quagga-dev 932]).
* 2003-06-04 Paul Jakma <paul@dishone.st>paul2003-06-041-5/+48
| | | | * Merge of zebra privileges
* Add back support for null0 interface blackhole routes.paul2003-05-251-1/+8
|
* Route (reject|blackhole) support from 6Wind patch.hasso2003-05-251-8/+0
|
* Initial revisionpaul2002-12-131-0/+441