summaryrefslogtreecommitdiffstats
path: root/ospf6d/ospf6_network.c
Commit message (Collapse)AuthorAgeFilesLines
* *: use an ifindex_t type, defined in lib/if.h, for ifindex valuesPaul Jakma2016-02-261-3/+3
|
* Fix most compiler warnings in default GCC build.Paul Jakma2014-09-231-14/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix lots of warnings. Some const and type-pun breaks strict-aliasing warnings left but much reduced. * bgp_advertise.h: (struct bgp_advertise_fifo) is functionally identical to (struct fifo), so just use that. Makes it clearer the beginning of (struct bgp_advertise) is compatible with with (struct fifo), which seems to be enough for gcc. Add a BGP_ADV_FIFO_HEAD macro to contain the right cast to try shut up type-punning breaks strict aliasing warnings. * bgp_packet.c: Use BGP_ADV_FIFO_HEAD. (bgp_route_refresh_receive) fix an interesting logic error in (!ok || (ret != BLAH)) where ret is only well-defined if ok. * bgp_vty.c: Peer commands should use bgp_vty_return to set their return. * jhash.{c,h}: Can take const on * args without adding issues & fix warnings. * libospf.h: LSA sequence numbers use the unsigned range of values, and constants need to be set to unsigned, or it causes warnings in ospf6d. * md5.h: signedness of caddr_t is implementation specific, change to an explicit (uint_8 *), fix sign/unsigned comparison warnings. * vty.c: (vty_log_fixed) const on level is well-intentioned, but not going to fly given iov_base. * workqueue.c: ALL_LIST_ELEMENTS_RO tests for null pointer, which is always true for address of static variable. Correct but pointless warning in this case, but use a 2nd pointer to shut it up. * ospf6_route.h: Add a comment about the use of (struct prefix) to stuff 2 different 32 bit IDs into in (struct ospf6_route), and the resulting type-pun strict-alias breakage warnings this causes. Need to use 2 different fields to fix that warning? general: * remove unused variables, other than a few cases where they serve a sufficiently useful documentary purpose (e.g. for code that needs fixing), or they're required dummies. In those cases, try mark them as unused. * Remove dead code that can't be reached. * Quite a few 'no ...' forms of vty commands take arguments, but do not check the argument matches the command being negated. E.g., should 'distance X <prefix>' succeed if previously 'distance Y <prefix>' was set? Or should it be required that the distance match the previously configured distance for the prefix? Ultimately, probably better to be strict about this. However, changing from slack to strict might expose problems in command aliases and tools. * Fix uninitialised use of variables. * Fix sign/unsigned comparison warnings by making signedness of types consistent. * Mark functions as static where their use is restricted to the same compilation unit. * Add required headers * Move constants defined in headers into code. * remove dead, unused functions that have no debug purpose.
* ospf6d: set cmsg size correctlyChristian Franke2013-11-201-1/+1
| | | | | | | | On both Linux and FreeBSD, msg_controllen should be set to CMSG_LEN, not CMSG_SPACE. This avoids sending 4 bytes of trailing garbage to the kernel. Signed-off-by: Christian Franke <chris@opensourcerouting.org>
* ospf6d/ospfd: refactor some common definesDinesh Dutt2013-10-221-0/+1
| | | | | | | | | Rearranging common defs and structures for use betweeen OSPFv2 and OSPFv3. Created a new file called libospf.h under lib directory to hold defines that are common between OSPFv2 and OSPFv3 code bases. [DL: split of defines refactor from timer refactor] Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
* ospf6d: justify multicast group managementVyacheslav Trushkin2011-12-131-73/+9
| | | | | | | | | | | * ospf6_network.[ch] * ospf6_sso(): new function supersedes ospf6_join_allspfrouters(), ospf6_leave_allspfrouters(), ospf6_join_alldrouters() and ospf6_leave_alldrouters() * ospf6_interface.c * ospf6_interface_state_change(): update respectively * interface_up(): ditto * interface_down(): ditto
* IPv6 transport class suppportStephen Hemminger2011-10-171-0/+9
| | | | | | | | | | | | | | | | | | | | | 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
* [trivia] finish off static'ification of ospf6d and ripngdPaul Jakma2008-08-221-7/+7
| | | | | | | | | 2008-08-15 Paul Jakma <paul.jakma@sun.com> * {ospf6d,ripngd}/*: Finish job of marking functions as static, or exporting declarations for them, to quell warning noise with Quagga's GCC default high-level of warning flags. Thus allowing remaining, more useful warnings to be more easily seen.
* [ospf6d] GNU Zebra #3562: ABR Crash fix, memory fixes, route table debugsPaul Jakma2006-05-151-0/+2
| | | | | | | | 2006-02-22 Yasuhiro Ohara <yasu@sfc.wide.ad.jp> * valgrind check and memory fix * route table identification string added * ospf6d.h: version 0.9.7q
* *.c: Change level of debug messages to LOG_DEBUG.hasso2004-12-241-4/+4
|
* 2004-11-19 Andrew J. Schorr <ajschorr@alumni.princeton.edu>ajs2004-11-201-8/+8
| | | | | * global: Replace strerror with safe_strerror. And vtysh/vtysh.c needs to include "log.h" to pick up the declaration.
* Merge svn revision 1048 from Zebra cvs. Also add missing sokopt.h includehasso2004-09-291-0/+1
| | | | to ospf6_network.h.
* 2004-07-23 Paul Jakma <paul@dishone.st>paul2004-07-231-10/+1
| | | | | * ospf6_main.c: Delete LOG_PERROR, not portable. * ospf6_network.c: (ospf6_set_pktinfo) use setsockopt_ipv6_pktinfo
* Ospf6d merge from Zebra repository with added privs stuff and mergedhasso2004-05-181-269/+93
| | | | zclient changes.
* 2003-06-04 Paul Jakma <paul@dishone.st>paul2003-06-041-0/+9
| | | | * Merge of zebra privileges
* ospf6d part of 6Wind patch.hasso2003-05-251-7/+1
|
* Initial revisionpaul2002-12-131-0/+501