summaryrefslogtreecommitdiffstats
path: root/lib/sockopt.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge Quagga master branch -- as of 1-Mar-2012 -- into euro_ix_bex21bChris Hall2012-03-171-90/+129
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Version 0.99.20ex21b This brings us up to date with: commit 48f99b0c2bfed8d3880732d188e1d5964f575ee4 Date: Thu Sep 29 16:55:23 2011 +0400 release: 0.99.20 and the subsequent: commit dc00d2bb56aa6a84dd2328133f69db3c3e6d9dc7 Date: Sun Jan 8 14:47:06 2012 +0000 Marker merge for 'RE-0.99.17.6' This marker merge (i.e. an 'ours' strategy merge) is a placeholder to show that all commits in Quagga-RE stable, to its release RE-0.99.17.6 tag, have been reviewed and merged into 'master'. and then further commits (in descending date order) commit b51a3a31500133e3e26f12e7639f297c655bc735 commit ef2d5d100431031c32ea35b3c834b46cff16f511 commit 4c78376f96cd2ca56f1c6476b76fd659654431f5 commit e854095932260b3e6187902aa9a7baa0e96b9428 commit e6b03b77766dce8009ad7b4a2392e14addf4ab0f commit c25eaffdb2190149e768dc4ee4efc913c6d02992 commit d034aa027ef44d0a74805c27ad2a4d8ea20395d1 commit 907fd95e502e10334e5390c73cc57588b88b8171 commit 7fd6cd819ff98f0580b745ba637990df9c20ef0f commit 4c0cf00afc4340a429a9c4830f638b4593d7c3af commit 4afa50b393ff1fb34dd577888a05b81dfdced5af commit 6eb0c5ab1d43bcf9edd4fefd19031f2b96ded728 commit aca43b656623f38dfa6ea835dacbdfec51d03a67 commit 6bb1273e83c29b3aeff9584bc8f6272e773294ad commit d660f698427277ce695a5b756f3143c8304274ea commit 6134b875f39986564aced5e2d7329fcd852f17f4 commit b4e45f67057be22133b6bec88cdf285d5c8214db commit 6eac79a6fed4842e00607c00c445213b51bba377 commit cb32fd690a957819865219a847e3c21a53a0f419 commit 73bfe0bd9adb8e4dfcee7239e56a425c6d58f4e9 commit f768f367bcd1f37a53c563495176a5a134caf234 commit c7ec179a95c1ed4fcd3d3be3f981c8c20dce534a commit cddf391bf6839e9f093cef15508669c1f3f92122 commit 5a616c08ce089e25dc0e8da920727af4d11279bf commit 6ae93c058725991df5a9ae35cefec368919b5fea commit fc98d16ea77372f4ab4231e8904f8467e8d1ef71 A summary of the changes that relate to bppd, zebra and the lib follows. bgpd changes * attribute handling: (a) now checks the flag byte for all attributes and issues suitable log messages and notifications, (b) reports some length issues that previously let slide (local pref). Tighten End-of-RIB detection -- now iff an MP_UNREACH is the *only* attribute and no ordinary update or withdraw. * added --socket/-z option -- sets zebra socket name * sets IPv6 tclass as required * improved next hop handling and added "show ip bgp scan" and "show ip bgpd scan detail" commands. see commits: fc98d16ea77372f4ab4231e8904f8467e8d1ef71 0e8032d69961ae196c11ba6ead856084c7acf7c2 b64bfc1c4a552fc0b4dd024d5f77171ec848a5df 318f0d8a7f5e8e87086bbf2a9e7c4b35638951ac 8e80bdf20f493a71bcf74262ed3aa3a2437f4df6 f04a80a5d209dbb54f6fec5d0149b7c0e489d29e * removed SAFI_UNICAST_MULTICAST * fiddled with SAFI_MPLS_LABELED_VPN -- unsure if this is now complete -- stuff here TODO ! * support for multicast SAFI see commits: 73bfe0bd9adb8e4dfcee7239e56a425c6d58f4e9 5a616c08ce089e25dc0e8da920727af4d11279bf * added "match probability" commands * uses "route_types.txt" more effectively -- which affects the implementation of "redistribute" commands see commit: e0ca5fde7be5b5ce90dae78c2477e8245aecb8e9 * "nexthop-local unchanged" included in configuration. zebra changes * some whitespace change clutter :-( * ZEBRA_HELLO and mopping up routes (BZ#448) * implement route_types.h * support for SAFI_MULTICAST commit f768f367bcd1f37a53c563495176a5a134caf234 IPv6 MP-BGP Routes addition and deletion commit cddf391bf6839e9f093cef15508669c1f3f92122 IPv4 MP-BGP Routes addition and deletion * brought up to date with RFC6275 * add --socket/-z option * add "ipv6 nd mtu <1-65535>" commands lib changes * filter-list handling -- does not free the filter-list before calling the delete_hook(). However, unlike commit 6a2e0f36b103386e57dbe3a6ee4716e809111198 *does* remove the filter-list from the name look-up, before calling the delete_hook() -- which I believe works better. * md5.c now includes RFC 2104 HMAC However fixed to remove compiler warning, by replacing use of caddr_t by unsigned char*. Some phantom whitespace changes elsewhere * prefix.c: commits d171bf58ef12ace43d48565e6870722dece1e6ed 051954f574b9c26458518a7029aeed118f0da620 9663386f16e6285a322747514527fdf1d19788e4 - optimise masklen2ip() and apply_mask_ipv4() -- the version here should work on a Big-Endian machine as well. - optimise ip_masklen() -- the version here should (a) work on a Big-Endian machine, (b) give the same result as before if the netmask is not, in fact, valid, and (c) uses just 256 bytes of table -- not 64K. Version here is probably not quite as fast as the previous patch... but certainly faster that what was there before. * zclient.c: introduced zclient_serv_path, for general zclient and for bgpd zlookup. Added ZEBRA_HELLO to client start. Added safi to ipv4 and ipv6 route add/delete.
| * lib: compile even without IPV6_TCLASSDenis Ovsienko2011-10-171-1/+3
| |
| * IPv6 transport class suppportStephen Hemminger2011-10-171-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | IPv6 supports the same concept of differentiated service for routing protocols as IPv4, but like too many things, the standards committee decided that having two names for the same thing wasn't good enough and introduced a third more generic term transport class. The socket option to set transport class works the same as IPv4, but the arguments are different. * lib/sockopt.[ch] * setsockopt_ipv6_tclass(): new function * bgpd/bgp_network.c * bgp_connect(): set socket option * bgp_listener(): set socket option * ospf6d/ospf6_network.c * ospf6_set_transport_class(): new function * ospf6_serv_sock(): set socket option * ripngd/ripngd.c * ripng_make_socket(): set socket option
| * lib: use "protocol-independed API" from RFC3678, if that is availableDmitrij Tejblum2011-09-271-4/+22
| | | | | | | | | | | | | | | | (This commit is based on the patch from BZ#420, and should fix that bug.) * configure.ac: detect availability of that API * sockopt.c (setsockopt_ipv4_multicast): use it for join/leave IPv4 multicast groups
| * lib: futher simplification of setsockopt_ipv4_multicast()Dmitrij Tejblum2011-09-271-64/+44
| | | | | | | | | | * sockopt.c (setsockopt_ipv4_multicast): check for wrong optname with assert(), rather than return an error.
| * lib: fix omission in the previous commit to lib/sockopt.cDmitrij Tejblum2011-09-271-0/+1
| | | | | | | | | | * sockopt.c (setsockopt_ipv4_multicast_if): fix missed line in the previous commit.
| * lib: simplify interface of setsockopt_multicast_ipv4().Dmitrij Tejblum2011-09-271-32/+45
| | | | | | | | | | | | | | | | | | | | | | | | * 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
| * lib: remove unused variableDenis Ovsienko2011-09-271-3/+1
| | | | | | | | * sockopt.c (getsockopt_ifindex): "ifindex" was never used
* | Work around issues with IPV6_MINHOPCOUNT -- -DNO_LINUX_IN6_HChris Hall2011-09-051-5/+15
| | | | | | | | | | | | | | | | On GNU_LINUX IPV6_MINHOPCOUNT is defined in linux/in6.h. Unfortunately, that will not always compile due to clashes with netinet/in.h !! So, as a work-around -DNO_LINUX_IN6_H disables the inclusion of linux/in6.h -- which avoids the compilation issue, but turns off IPV6_MINHOPCOUNT.
* | Merge branch 'euro_ix' of /git/quagga.euro-ix into pipeworkChris Hall2011-08-261-2/+2
|\ \
| * | Fix compilation of sockopt.c when no IP_MINTTL or IPV6_MINHOPCOUNT (II)Chris Hall2011-08-261-1/+1
| | |
| * | Fix compilation of sockopt.c when no IP_MINTTL or IPV6_MINHOPCOUNT.Chris Hall2011-08-261-2/+4
| | |
* | | Fix compilation of sockopt.c when no IP_MINTTL or IPV6_MINHOPCOUNT.Chris Hall2011-08-261-2/+4
|/ /
* | Merge with main Quagga source as of 29-Jul-2011.ex17Chris Hall2011-08-121-329/+811
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Create euro_ix branch. Update version to: 0.99.18ex17 Of particular note: * includes support for GTSM: neighbor ... ttl-security hops X no neighbor ... ttl-security hops X where X is 1-254. For usual case of immediately connected peer, X == 1. Cannot set ttl-security while ebgp-multihop is set, and vice-versa. If underlying O/S does not support GTSM, then will set ttl as per ebgp-multihop. In passing, have fixed various bugs in the main Quagga branch. * initial support for draft-ietf-idr-optional-transitive Does not yet support "neighbor-complete" flag. * main Quagga now uses TCP_CORK and permanent non-blocking Do not beleive TCP_CORK to be necessary for euro_ix code... which has a different buffering strategy. The euro_ix code already runs sockets permanently non-blocking. * various fixes to attribute intern/unintern Trying to remove memory leaks. Nobody seems convinced that this has been perfected, yet. * fixes for ospfd and ospf6d issues. Up to date with master branch up to: commit 538cb284864c17de66152a5236db4cd80e3e7639 Merge: 036a6e6 8ced4e8 Author: Paul Jakma <paul@quagga.net> Date: Fri Jul 29 18:21:50 2011 +0100
* | Don't return "Not Supported" when setting NULL MD5 passwordChris Hall2010-04-281-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If TCP MD5 signature is not supported, sockopt_tcp_signature() returns ENOSYS. This change means that if the given password is NULL or an empty string, then returns OK, even when TCP MD5 signature is not supported. If the password is being cleared, it doesn't matter that it could never have bee set in the first place ! This means that unless a password is required, it is safe to call sockopt_tcp_signature() whether the facility is supported or not. Which further means that only this function needs to worry about the circumstances under which it is supported !
* | Fixes to compile on FreeBSD 8.0 with gcc 4.2.1Chris Hall2010-04-161-6/+6
| |
* | New functions for error numbers and addresses in messages.Chris Hall2010-04-081-16/+17
| | | | | | | | | | | | | | | | Implemented less onerous ways of including descriptions of errors and IP addresses in logging and other messages. Implemented mapping of error numbers to error names, which is generally more meaningful.
* | First beta releaseChris Hall2010-04-061-117/+200
| | | | | | | | | | | | | | Various bug fixes and improvements. Running with a fair amount of debug/assert code, which must be removed at some date.
* | Getting BGP Engine to start and removing warnings.Chris Hall2010-01-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Finish the wiring required to get bgp_msg_read to process OPEN messages into the connection's open_state, and be able to check for correct peer AS, etc. Removed bugs preventing messages from being written. Added BGP Id check to collision detection logic. Removed as many warnings from comilation as possible. Replaced horrible FIFO kludge in the process. (Introduced the even more horrible miyagi kludge.) modified: bgpd/bgp_advertise.c modified: bgpd/bgp_advertise.h modified: bgpd/bgp_connection.c modified: bgpd/bgp_connection.h modified: bgpd/bgp_debug.c modified: bgpd/bgp_fsm.c modified: bgpd/bgp_msg_read.c modified: bgpd/bgp_msg_write.c modified: bgpd/bgp_network.c modified: bgpd/bgp_nexthop.c modified: bgpd/bgp_notification.c modified: bgpd/bgp_open.c modified: bgpd/bgp_packet.c modified: bgpd/bgp_session.c modified: bgpd/bgp_session.h modified: bgpd/bgpd.c modified: lib/Makefile.am modified: lib/distribute.c modified: lib/if_rmap.c new file: lib/miyagi.h modified: lib/prefix.h modified: lib/sockopt.c modified: lib/stream.c modified: lib/thread.c modified: lib/vty.c modified: lib/zebra.h modified: tests/bgp_capability_test.c modified: tests/bgp_mp_attr_test.c modified: tests/ecommunity_test.c modified: tests/heavy-thread.c modified: tests/heavy-wq.c modified: tests/heavy.c modified: tests/main.c modified: tests/test-checksum.c modified: tests/test-sig.c modified: watchquagga/watchquagga.c modified: zebra/if_netlink.c modified: zebra/ioctl.c modified: zebra/rt_netlink.c modified: zebra/rtread_netlink.c
* | Initial commit for bgp_engine branch -- seeding new files...Chris Hall2010-01-041-62/+119
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On branch bgp_engine modified: .gitignore modified: bgpd/Makefile.am new file: bgpd/bgp.h new file: bgpd/bgp_common.c new file: bgpd/bgp_common.h new file: bgpd/bgp_connection.c new file: bgpd/bgp_connection.h modified: bgpd/bgp_debug.c new file: bgpd/bgp_engine.c new file: bgpd/bgp_engine.h modified: bgpd/bgp_fsm.c modified: bgpd/bgp_fsm.h modified: bgpd/bgp_network.c modified: bgpd/bgp_network.h new file: bgpd/bgp_notification.c new file: bgpd/bgp_notification.h modified: bgpd/bgp_open.c new file: bgpd/bgp_open_state.c new file: bgpd/bgp_open_state.h modified: bgpd/bgp_packet.c new file: bgpd/bgp_peer.c new file: bgpd/bgp_peer.h modified: bgpd/bgp_route.c new file: bgpd/bgp_session.c new file: bgpd/bgp_session.h modified: bgpd/bgp_vty.c modified: bgpd/bgp_zebra.c modified: bgpd/bgpd.c modified: bgpd/bgpd.h modified: lib/Makefile.am modified: lib/memtypes.c modified: lib/mqueue.c modified: lib/mqueue.h new file: lib/qafi_safi.h modified: lib/qpselect.c modified: lib/qpselect.h modified: lib/qpthreads.c modified: lib/qpthreads.h modified: lib/sockopt.c modified: lib/sockunion.c modified: lib/sockunion.h modified: lib/stream.c modified: lib/stream.h modified: lib/symtab.h modified: lib/zebra.h
* Fixes to RFC2385/MD5 BGPChris Caputo2009-06-231-3/+12
| | | | | | | | | * bgpd/bgp_network.c: Fix MD5 listen in IPv4 version of bgp_socket() by adding listen socket to listen_sockets list so that MD5 passwords can get set. * lib/sockopt.c: (sockopt_tcp_signature) Fix bogus "% Error while applying TCP-Sig to session(s)" / "can't set TCP_MD5SIG option" startup error messages by not returning error when there isn't one.
* [lib] sockopt_tcp_signature: sin6 requires HAVE_IPV6Stephen Hemminger2009-06-181-0/+2
| | | | | An external user was building on system without IPv6 and it wouldn't work.
* [bgpd] Add support for the old Linux 2.4, TCP_MD5_AUTH RFC2385 patchPaul Jakma2009-06-121-2/+25
| | | | | | | | | * configure.ac: Add a --enable-linux24-tcp-md5 argument, to compile in support for the old TCP-MD5 patch for Linux 2.4 systems. This overrides auto-detection of TCP-MD5 supported by the target system. * lib/sockopt.c: (sockopt_tcp_signature) add in a variant for the old Linux 2.4, TCP_MD5_AUTH variant of TCP-MD5 support, conditional on the previous configure arg.
* [lib] Fix mistake in tcp-md5sig commit which broke compile on BSDPaul Jakma2008-08-221-2/+2
| | | | | | | | 2008-08-15 Paul Jakma <paul.jakma@sun.com> * lib/sockopt.c: (sockopt_tcp_signature) ifdef'ing hid variable declaration for HAVE_DECL_TCP_MD5SIG && !GNU_LINUX, breaking compile - fix.
* [lib] mes_lookup string lookup table argument should be marked constStephen Hemminger2008-08-221-0/+13
| | | | | | | | | 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>
* [bgpd] TCP-MD5: password vty configuration and initial Linux supportPaul Jakma2008-07-211-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Bug #362 is fixed now.Denis Ovsienko2007-08-211-0/+29
|
* [lib] Add comments regarding setsockopt_multicast_ipv4 arguments.Andrew J. Schorr2007-07-061-2/+3
| | | | | | | 2007-07-06 Andrew J. Schorr <ajschorr@alumni.princeton.edu> * sockopt.{c,h}: (setsockopt_multicast_ipv4) Add some comments about the arguments.
* 2005-10-20 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-10-211-6/+47
| | | | | | * sockopt.c: (setsockopt_multicast_ipv4) If IP_ADD_MEMBERSHIP fails with errno equal to EADDRINUSE, then issue an info message and try IP_DROP_MEMBERSHIP followed by IP_ADD_MEMBERSHIP.
* 2005-05-07 Yar Tikhiy <yar@comp.chem.msu.su>paul2005-05-071-5/+9
| | | | | | | | * configure.ac: Check for OSes which support passing ifindex in struct ip_mreq. * lib/sockopt.c: Add support for BSD style ifindex in ip_mreq. * ospfd/ospf_network.c: Log ifindex on multicast membership leave/join events.
* 2005-01-04 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2005-01-041-1/+1
| | | | | | | | | | | | | | | | * configure.ac: Added test for broken CMSG_FIRSTHDR macro (relevant for Solaris 8 and unpatched Solaris 9, don't know whether other platforms are affected). * zebra.h: Define ZCMSG_FIRSTHDR appropriately based on whether config.h indicates HAVE_BROKEN_CMSG_FIRSTHDR (as determined by the configure test program). * sockopt.c: (getsockopt_cmsg_data) Use ZCMSG_FIRSTHDR instead of CMSG_FIRSTHDR. * rtadv.c: (rtadv_recv_packet,rtadv_send_packet) Use ZCMSG_FIRSTHDR instead of CMSG_FIRSTHDR. * ripd.c: (rip_recvmsg) Use ZCMSG_FIRSTHDR instead of CMSG_FIRSTHDR. * ripngd.c: (ripng_recv_packet) Use ZCMSG_FIRSTHDR instead of CMSG_FIRSTHDR.
* Add comment explaining about limit of 20 joined groups on a socket.gdt2004-12-301-5/+12
|
* 2004-12-29 Greg Troxel <gdt@poblano.ir.bbn.com>gdt2004-12-291-32/+43
| | | | | | | | | * sockopt.c (getsockopt_ipv4_ifindex): Document calling convention. Beef up comments. Handle the case where the cmsghdr has a zero controllen, or more specifically when the wanted option is not present. This is needed for Solaris 8, and in general for any platform for which configure finds a method and it can fail. Mark some changes with XXX to be cleaned up post 0.98.
* 2004-12-29 Greg Troxel <gdt@poblano.ir.bbn.com>gdt2004-12-291-0/+22
| | | | | | | | * sockopt.c (getsockopt_ipv4_ifindex): Return 0 when passed a NULL cmsghdr pointer. I believe this will avoid ospfd crashing on Solaris 8, which seems to define IP_RECVIF but not actually implement it.
* 2004-12-28 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-12-281-5/+8
| | | | | | * sockopt.c: (setsockopt_ipv4_ifindex) Improve error message. When neither IP_PKTINFO nor IP_RECVIF is defined, make return value deterministic (-1).
* 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-201-2/+2
| | | | | * global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
* Fix previous change to use new function safe_strerror instead of strerror.ajs2004-11-191-1/+1
|
* 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-191-2/+3
| | | | | * sockopt.c: (setsockopt_so_recvbuf) Stop error message from being printed every time.
* 2004-11-01 Paul Jakma <paul@dishone.st>paul2004-11-011-27/+0
| | | | * sockopt.c: (setsockopt_pktinfo) remove, its unused.
* 2004-10-22 Paul Jakma <paul@dishone.st>paul2004-10-221-1/+1
| | | | | | | * sockopt.c: (setsockopt_pktinfo) unexported * sockopt.h: Cleanup SOCKOPT_CMSG defines a bit. Add a throwaway define for SOPT_SIZE_CMSG_IFINDEX_IPV4 for systems which have neither IP_RECVIF nor IP_PKTINFO (eg openbsd).
* 2004-10-13 Paul Jakma <paul@dishone.st>paul2004-10-221-2/+2
| | | | | * sockopt.c: (getsockopt_ipv4_ifindex) no ifindex should be 0, not -1.
* 2004-10-10 Paul Jakma <paul@dishone.st>paul2004-10-101-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * version.h.in: (pid_output*) add const qualifier. * command.h: Change DEFUN func to take const char *[] rather than char **, to begin process of fixing compile warnings in lib/. Nearly all other changes in this commit follow from this change. * buffer.{c,h}: (buffer_write) pointer-arithmetic is gccism, take const void * and cast an automatic const char *p to it. (buffer_putstr) add const * command.c: (zencrypt) const qualifier (cmd_execute_command_real) ditto (cmd_execute_command_strict) ditto (config_log_file) ditto. Fix leak of getcwd() returned string. * memory.{c,h}: Add MTYPE_DISTRIBUTE_IFNAME for struct dist ifname. * distribute.{c,h}: Update with const qualifier. (distribute_free) use MTYPE_DISTRIBUTE_IFNAME (distribute_lookup) Cast to char *, note that it's ok. (distribute_hash_alloc) use MTYPE_DISTRIBUTE_IFNAME. (distribute_get) Cast to char *, note that it's ok. * filter.c: Update with const qualifier. * if.{c,h}: ditto. * if_rmap.{c,h}: ditto. (if_rmap_lookup) Cast to char *, note that it's ok. (if_rmap_get) ditto. * log.{c,h}: Update with const qualifier. * plist.{c,h}: ditto. * routemap.{c,h}: ditto. * smux.{c,h}: ditto. Fix some signed/unsigned comparisons. * sockopt.c: (getsockopt_cmsg_data) add return for error case. * vty.c: Update with const qualifier.
* 2004-10-05 Paul Jakma <paul@dishone.st>paul2004-10-051-0/+26
| | | | | | * sockopt.{c,h}: add sockopt_iphdrincl_swab_{htosys,systoh}, functions to change byte order between system IP_HDRINCL order and host order.
* Compiler warnings fixes.hasso2004-09-261-3/+3
|
* 2004-09-17 Paul Jakma <paul@dishone.st>paul2004-09-211-2/+2
| | | | * sockopt.c: Add missing bracket
* 2004-09-17 Paul Jakma <paul@dishone.st>paul2004-09-171-0/+12
| | | | | | | | * ripngd/ripngd.c: move setsockopt_so_recvbuf to lib. * lib/sockopt.{c,h}: Add setsockopt_so_recvbuf, for ripd and ripngd. * ripd/ripd.c: set receive buffer to a decent size, some systems have low defaults. Problem noted and fix suggested by Stephan Schweizer in [zebra 20967].
* 2004-08-19 Paul Jakma <paul@dishone.st>paul2004-08-191-26/+50
| | | | | | | | | | | | | | | | | | | | | | | | 2004-08-19 Paul Jakma <paul@dishone.st> * sockopt.c: include sockopt.h rename some of the _pktinfo_ functions to _ifindex, where that is their purpose. (getsockopt_ipv6_pktinfo_ifindex) renamed to getsockopt_ipv6_ifindex. (setsockopt_ipv4_pktinfo) renamed to setsockopt_ipv4_ifindex (setsockopt_pktinfo) update with previous and add comment re AF_INET portability. (setsockopt_ifindex) generic ifindex function ala setsockopt_pktinfo. (getsockopt_ipv4_pktinfo_ifindex) renamed to getsockopt_ipv4_ifindex. (getsockopt_ipv4_ifindex) rejiggling to reduce repeated ifdef/elses. pktinfo case forgot to set ifindex. (getsockopt_pktinfo_ifindex) renamed to getsockopt_ifindex. update some calls to renamed functions. * sockopt.h: Update renamed exported functions Rename the CMSG_SIZE macros to IFINDEX. Guard IPv4 PKTINFO in a conditional define.
* 2004-07-23 Greg Troxel <gdt@poblano.ir.bbn.com>gdt2004-07-231-8/+11
| | | | | | | * sockopt.c (getsockopt_ipv4_pktinfo_ifindex): Make this compile on NetBSD, and add comments to make it less confusing. Change the sense of the SUNOS_5 test to make parallel structure between the variables and the code.
* 2004-07-23 Paul Jakma <paul@dishone.st>paul2004-07-231-0/+124
| | | | | | | | | | | | | | | | | * sockopt.h: Add SOPT_SIZE_CMSG_PKTINFO{_IPV{4,6}} define, for sizeof pktinfo as appropriate, to be used when allocating msg buffers. export setsockopt_pktinfo() and getsockopt_pktinfo_ifindex() * sockopt.c: (setsockopt_pktinfo_ifindex) new function to portably set received ifindex sock option. (getsockopt_pktinfo_ifindex) portably retrieve ifindex. (getsockopt_cmsg_data) retrieve indicated control info from message header. (getsockopt_ipv6_pktinfo_ifindex) ipv6 version of above. (setsockopt_ipv4_pktinfo) v4 version (setsockopt_pktinfo) the exported version (getsockopt_ipv4_pktinfo_ifindex) v4 specific version (getsockopt_pktinfo_ifindex) the exported version
* Initial revisionpaul2002-12-131-0/+199