Age | Commit message (Collapse) | Author |
|
* 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.
|
|
* 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.
|
|
* 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.
|
|
|
|
* 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.
|
|
* 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.
|
|
* sockopt.c: (setsockopt_ipv4_ifindex) Improve error message.
When neither IP_PKTINFO nor IP_RECVIF is defined, make return value
deterministic (-1).
|
|
* global: Replace strerror with safe_strerror. And vtysh/vtysh.c
needs to include "log.h" to pick up the declaration.
|
|
|
|
* sockopt.c: (setsockopt_so_recvbuf) Stop error message from being
printed every time.
|
|
* sockopt.c: (setsockopt_pktinfo) remove, its unused.
|
|
* 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).
|
|
* sockopt.c: (getsockopt_ipv4_ifindex) no ifindex should be 0, not
-1.
|
|
* 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.
|
|
* sockopt.{c,h}: add sockopt_iphdrincl_swab_{htosys,systoh},
functions to change byte order between system IP_HDRINCL order
and host order.
|
|
|
|
* sockopt.c: Add missing bracket
|
|
* 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>
* 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.
|
|
* 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.
|
|
* 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
|
|
|