Age | Commit message (Collapse) | Author |
|
|
|
2008-07-01 Paul Jakma <paul.jakma@sun.com>
* ioctl.c: (if_get_flags) Deal more gracefully with failure
of the BSD link-state SIOCGIFMEDIA ioctl, as some interfaces
apparently don't implement it (e.g. tun).
Also, make BSD link-state checking be conditional on the
'link-detect' interface configuration flag, as it should be.
Fixes bug #465.
|
|
|
|
2008-01-11 Andrew J. Schorr <ajschorr@alumni.princeton.edu>
* lib/zebra.h: Revert previous change, no need to include
<net/if_media.h> here.
* zebra/ioctl.c: If HAVE_BSD_LINK_DETECT is defined, include
<net/if_media.h>
(if_get_flags) Remove debug messages about BSD link state.
* zebra/kernel_socket.c: (bsd_linkdetect_translate) If link state
is unknown, we should set the IFF_RUNNING flag.
|
|
2008-01-10 Ingo Flaschberger <if@xip.at>
* configure.ac: Define HAVE_BSD_LINK_DETECT if <net/if_media.h> is
present.
* lib/zebra.h: If HAVE_BSD_LINK_DETECT is defined,
include <net/if_media.h>.
* zebra/ioctl.c: (if_get_flags) If HAVE_BSD_LINK_DETECT, use the
SIOCGIFMEDIA ioctl to ascertain link state.
* zebra/kernel_socket.c: (bsd_linkdetect_translate) New function to
map the ifm_data.ifi_link_state value into the IFF_RUNNING flag.
(ifm_read) Call bsd_linkdetect_translate to fix the IFF_RUNNING
flag before calling if_flags_update.
|
|
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-10 Paul Jakma <paul.jakma@sun.com>
* ioctl{_solaris,}.c: (if_get_mtu) Ping clients via
zebra_interface_up_update if MTU is changed.
|
|
2006-01-25 Paul Jakma <paul.jakma@sun.com>
* (general) More solaris PF_ROUTE hacks. The IFF_UP mangling
for solaris was incomplete on the PF_ROUTE side. fix it.
This changeset generally uglifies things. For some future
work I'd like to see the state changes seperated out from
the details of the code. Differences between systems might
then be slightly easier to implement without convoluted
hacks.
Changes should be specific to Solaris mostly, however
also tested on FreeBSD 6.
* if_ioctl_solaris.c: (interface_list_ioctl) ignore ~IFF_UP
interfaces, we'll hear about them when/if interface goes up
through NEWADDR.
Update flags explicitely at end of it to kick mangling.
* ioctl_solaris.c: (if_mangle_up) removed to interface.c, in
kind.
(lifreq_set_name) more convenient to take the string, than
the ifp.
(if_get_flags_direct) new convenience function, returns
the actual flags. Used during bootstrap in if_ioctl_solaris.c
to peek at flags of logical interfaces to see whether or
not to ignore them.
(if_get_flags) ENXIO means it's gone, poke out IFF_UP and
kick flags update.
(if_{un,}set_flags) flags argument should be 64bit.
* ioctl.{c,h}: flags argument should be 64bit.
* interface.h: Add a 'primary_state' flag to struct zebra_if on
SUNOS_5.
Export if_flags_update.
* interface.c: (if_flags_mangle) moved over in kind from
ioctl_solaris.c. Nasty kludge to try get IFF_UP right, as
much as is possible. Also keep track of the actual IFF_UP
value for the primary interface, so we can know when the ifp
must be deleted.
(if_flags_update) Take a new interface flags value, apply it
to the interface, and take whatever actions are required due
to flag transitions.
(if_refresh) flag state change logic is moved out to
previous. Just call if_get_flags, which will end up using
previous to effect the update of flags.
(if_flag_dump_vty) IFF_IPV{4,6} aren't interesting, VIRTUAL
and NOXMIT are though.
* kernel_socket.c: (ifm_read) Down->Down transitions shouldn't
create ifp, for non-IFANNOUNCE systems.
Use if_flags_update to update flags.
flag transition logic is now handled automatically through
if_flags_update.
(ifam_read) Better to call if_refresh *after* adding
connected addresses, as connected count affects IFF_UP on
IFF_UP-mangled systems.
On Solaris, Up->Down due to DELADDR means we need to delete
the ifp - the IFINFO might already have been and gone.
* rt.h: include other dependent headers.
|
|
* (global) Extern and static'ification, with related fixups
of declarations, ensuring files include their own headers, etc.
if_ioctl.c: (interface_info_ioctl) fix obvious arg mis-order in
list loop
|
|
* daemon.c: (daemon) Replace perror with zlog_err.
* vty.c: (vty_serv_un) Replace perror with zlog_err.
* ripd.c: (rip_create_socket) Replace perror with zlog_err.
* ioctl.c: (if_ioctl,if_ioctl_ipv6,if_get_flags) Replace perror with
zlog_err.
* ioctl_solaris.c: (if_ioctl,if_ioctl_ipv6) Replace perror with
zlog_err.
|
|
* if_ioctl_solaris.c: (interface_list_ioctl) Save errno before calling
zserv_privs.change.
* ioctl{,_solaris}.c: (if_ioctl,if_ioctl_ipv6) Save errno before calling
zserv_privs.change.
* ipforward_solaris.c: (solaris_nd) Save errno before calling
zserv_privs.change.
* irdp_main.c: (irdp_sock_init) Save errno before calling
zserv_privs.change.
[backport candidate]
|
|
* ioctl.c: (if_get_mtu) set mtu6 to mtu
* mtu_kvm.c: (if_kvm_get_mtu) set mtu6 to mtu
* rt_netlink.c: (netlink_interface) set mtu6 to mtu
(netlink_link_change) ditto
2004-05-09 Sowmini Varadhan <sowmini.varadhan@sun.com>
* interface.c: (if_delete_update) only used with HAVE_NETLINK
and RTM_IFANNOUNCE.
(if_flag_dump_vty) Solaris IFF_IPV4 and IFF_IPV6 if flags
(if_dump_vty) print mtu6 if not same as mtu
|
|
* lib/regex.c: bzero -> memset
* zebra/ioctl.c: ditto. bzero is not portable.
|
|
* zebra/ioctl.c: Properly zero-out struct ifreq before passing it
to the SIOCSIFFLAGS ioctl(2), so that it doesn't
occasionally trigger promisc mode on interface.
Reported/tested by: Vladimir B. Grebenschikov <vova@sw.ru>
(patch snarfed taken from FreeBSD ports)
|
|
* Merge of zebra privileges
|
|
|
|
|