]> git.proxmox.com Git - mirror_frr.git/log
mirror_frr.git
8 years agoHACKING: rename to HACKING.md in prep for conversion to MarkDown
Paul Jakma [Sun, 21 Jun 2015 21:38:44 +0000 (22:38 +0100)]
HACKING: rename to HACKING.md in prep for conversion to MarkDown

(cherry picked from commit 3e71e369452c38c9c16a19d0edd40323e6b31023)

8 years agoFixed if_add_update possible null dereference
Morgan Stewart [Thu, 17 Sep 2015 23:04:30 +0000 (19:04 -0400)]
Fixed if_add_update possible null dereference

Coverity Scan #1221454
In zebra/interface.c if_data could be null dereferenced without early
check.

Signed-off-by: Morgan Stewart <morgan@cumulusnetworks.com>
Reviewed-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit c8394ace7081ef0e71f3d162067c83c2629fc088)

8 years agozebra: Fix leaked sockets in rtadv.c
Morgan Stewart [Wed, 16 Sep 2015 17:17:54 +0000 (13:17 -0400)]
zebra: Fix leaked sockets in rtadv.c

Coverity Scan #709790
In zebra/rtadv.c: rtadv_make_socket leaks socket for error cases.
Added lines to close the socket for each error case or return.

Signed-off-by: Morgan Stewart <morgan@cumulusnetworks.com>
(cherry picked from commit 26b663da7ea8a3efae816d6e7fda293bdc1082f5)

8 years agozebra: fix addr sent in ZEBRA_IPV6_NEXTHOP_LOOKUP
Hiroshi Yokoi [Tue, 8 Sep 2015 02:52:20 +0000 (11:52 +0900)]
zebra: fix addr sent in ZEBRA_IPV6_NEXTHOP_LOOKUP

I found that zebra doesn't set correct IPv6 address in its result because of
using *addr's address.  Although I'm using 0.99.22, the latest version has
also use "&addr".  Shouldn't it use "addr"?

Signed-off-by: Hiroshi Yokoi <hiroshi.yokoi.0313@gmail.com>
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 8ccd74c29f5242f312c1e0561497558482c9be65)

8 years agovtysh: allow --with-libpam to build with --enable-werror
Donald Sharp [Fri, 4 Sep 2015 18:21:23 +0000 (14:21 -0400)]
vtysh: allow --with-libpam to build with --enable-werror

The function vtysh_pam fails the build with --enable-werror enabled
because it is a static function not declared as such

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 8965be4baaa1a4c619cbb4a8a10d15a72d80b60d)

8 years agobgpd: Addition of "show ip bgp dampening" command tree
Balaji [Sat, 16 May 2015 17:42:17 +0000 (23:12 +0530)]
bgpd: Addition of "show ip bgp dampening" command tree

This patch addresses David's comments and contains:

1.Addition of show ip bgp dampening command tree
2.Addition of show ip bgp dampening parameters to display BGP dampening
  parameters.

Signed-off-by: Balaji.G <balajig81@gmail.com>
(cherry picked from commit 3921cc54445417aa1ca22668063701a626e93098)

8 years agobuild/lib: Check for and include stdbool.h by default
Paul Jakma [Tue, 15 Sep 2015 15:15:27 +0000 (16:15 +0100)]
build/lib: Check for and include stdbool.h by default

* stdbool.h should be widely supported by now, and the 'bool' type makes
  more semantic sense than an integer type for boolean values.

(cherry picked from commit e8441a81f6c9f73bc8a25669003abffb40066703)

8 years agoospfd: trap on state change seems to send incorrect value for ospfNbrState
Fernando Soto [Mon, 11 May 2015 20:52:00 +0000 (20:52 +0000)]
ospfd: trap on state change seems to send incorrect value for ospfNbrState

The ospfNbrState in the ospf trap sent from ospfd shows an incorrect state.

For example, when the connection goes down, the ospfNbrState in the trap is
sent as '8' (full).  When the connection is reestablished, the state is sent
as '7' (loading).

The reason seems to be that the trap is sent from nsm_notice_state_change()
before the state is actually updated by calling nsm_change_state().

After applying the attached patch, the traps are sent with nbrState '1' when
the connection goes down and '8' when it goes back up.

Bugzilla #833 https://bugzilla.quagga.net/show_bug.cgi?id=833

(cherry picked from commit b6404390a713144252b62f49a328315d1952c6d8)

8 years agoospfd: Fix bug in 94266fa822ba, nbr_self rebuild didn't add valid nbr_self
Paul Jakma [Tue, 8 Sep 2015 14:31:45 +0000 (15:31 +0100)]
ospfd: Fix bug in 94266fa822ba, nbr_self rebuild didn't add valid nbr_self

94266fa822ba "ospfd: Self nbrs needs to be rebuilt when router ID changes."
  deleted the nbr_self, and added it back, but ospf_nbr_add_self doesn't
  actually create the nbr_self - it assumes it's already there. Leading
  to use after free and crashes after a router-id change.
* ospfd/ospf_neighbor.{c,h}: (ospf_nbr_self_reset) Little helper to reset the
  nbr_self correctly.
* ospf_interface.c: (ospf_if_cleanup) moved code to ospf_nbr_self_reset
* ospfd.c: (ospf_router_id_update) Use ospf_nbr_self_reset instead of doing
  the reset badly, fixing 94266fa822ba.

(cherry picked from commit c920e510d09c6c4ab63a3da5375009442a950f82)

8 years agoisisd: Add new adjacency to LSP neighbor list
Amritha Nambiar [Thu, 2 Jul 2015 22:42:58 +0000 (15:42 -0700)]
isisd: Add new adjacency to LSP neighbor list

isis_pdu.c :
New adjacency did not always get added to LSP neighbor list.

The adjacencies that were created once minimum time allowed before LSP
retransmission had surpassed, instantly got their LSP regenerated, but
the adjacency circuit type was not set to IIH PDU circuit type before
the LSP was regenerated , hence didn't pass the check for adjacency
circuit type in lsp_build(), and the adjacency was not added to neighbor list.

When a new adjacency is up, to build LSP with neighbor entry corresponding
to the adjacency, set adjacency circuit type to circuit type from hello PDU
header before new LSP is regenerated/built. This will result in the new
adjacency entry getting added to the LSP neighbor list TLV.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
(cherry picked from commit 06cc655c0345d610eb946bd41968caa03dc118ed)

8 years agoospfd: ospf_nbr_nbma_set()/ospf_snmp_vl_add() add unlock
Joakim Tjernlund [Mon, 8 Mar 2010 12:58:14 +0000 (13:58 +0100)]
ospfd: ospf_nbr_nbma_set()/ospf_snmp_vl_add() add unlock

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 4de398e3b676bcf041984e285dba12f229215419)

8 years agoospfd: ospf_ls_upd_send() add missing unlock.
Joakim Tjernlund [Mon, 8 Mar 2010 12:58:13 +0000 (13:58 +0100)]
ospfd: ospf_ls_upd_send() add missing unlock.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 4eaecdc403461fe59026e1ce3a217526d75eca25)

8 years agoospfd: ospf_ase.c, external_lsa locking fixes.
Joakim Tjernlund [Mon, 8 Mar 2010 12:58:12 +0000 (13:58 +0100)]
ospfd: ospf_ase.c, external_lsa locking fixes.

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit fc363cd8a02ad1ac8a6ca57013fd8c531d45926a)

8 years agoospfd: Move route_unlock_node() in ospf_ase_incremental_update()
Joakim Tjernlund [Mon, 8 Mar 2010 12:58:10 +0000 (13:58 +0100)]
ospfd: Move route_unlock_node() in ospf_ase_incremental_update()

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit d5643f5a477e099a3dcae4a707ccb5ca66bfee66)

8 years agoospfd: add missing unlock for ospf_interface_address_delete()
Joakim Tjernlund [Mon, 8 Mar 2010 12:58:09 +0000 (13:58 +0100)]
ospfd: add missing unlock for ospf_interface_address_delete()

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit fbb6c8650344fe72d39f538c681659e8b76a39d0)

8 years agoospfd: Self nbrs needs to be rebuilt when router ID changes.
Joakim Tjernlund [Thu, 19 Nov 2009 14:27:30 +0000 (15:27 +0100)]
ospfd: Self nbrs needs to be rebuilt when router ID changes.

Some self nbrs are identified by router_id, these needs
to be rebuilt instead of just resetting router ID.
Possibly one could optimize for !(virtual | ptop) links
by doing oi->nbr_self->router_id = router_id instead.

Router ID will change once after startup config has been
read and zebra reports router ID, unless router ID has
been configured in ospf.

(cherry picked from commit 94266fa822baf9b9c9e10ac03ccec8ccf3ce0c98)

8 years agolib, stream: fix stream sanity checks
Wenjian Ma [Fri, 19 Jun 2015 02:53:26 +0000 (10:53 +0800)]
lib, stream: fix stream sanity checks

Because  operator "!" has higher priority  than "&&",
So we put the "&&" expression in "()" to check both getp and endp.
Acked-by: Donald Sharp <sharpd@cumulusnetworks.com>
(cherry picked from commit 1ed8ce47b922b71f3b3cdd661e647bbe7ed2eca7)

8 years agolib: make sockunion2str safer to use
Timo Teräs [Sat, 23 May 2015 08:08:38 +0000 (11:08 +0300)]
lib: make sockunion2str safer to use

It's mostly used for logging, and the return value is never
checked, so try to make it valid.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 53009d387a633997b16d32224b50451b5c81b61a)

8 years agoroute table: constify some APIs
Timo Teräs [Fri, 22 May 2015 10:41:01 +0000 (13:41 +0300)]
route table: constify some APIs

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3293bc280f15d8e3c04e0bf9b0a8d54d342a87a9)

8 years agosockunion: add accessors for sockunion address
Timo Teräs [Fri, 22 May 2015 10:40:59 +0000 (13:40 +0300)]
sockunion: add accessors for sockunion address

Upcoming nhrp code will use this, and it can be used to remove
the sockunion2ip(X) macro.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 483abc037b0ac4b3ed168c4810bb14ea338fa80c)

8 years agosockopt: add support for querying tcp round-trip-time
Timo Teräs [Wed, 29 Apr 2015 06:43:03 +0000 (09:43 +0300)]
sockopt: add support for querying tcp round-trip-time

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 6b2672f3c9493aef3495192e113f95a7db4b65bc)

8 years agoospfd: Make ospf_passive_interface_update calls friendly to static analysis
Paul Jakma [Fri, 19 Sep 2014 15:41:10 +0000 (16:41 +0100)]
ospfd: Make ospf_passive_interface_update calls friendly to static analysis

* ospf_vty.c: ({no_}ospf_passive_interface_addr_cmd) To a static analyser,
  the call to ospf_passive_interface_update can look like uninitialised memory
  in addr might be read from. It won't be, as ospf_passive_interface_update
  only reads addr if params != IF_DEF_PARAMS, but not clear. Split up the
  helper into the two cases to make it clear.

(cherry picked from commit e1bcd4741c24ff990a9413ead9a9e37b80153046)

8 years agoisisd: fix crash on processing own p2p hello
Amritha Nambiar [Thu, 23 Apr 2015 22:36:55 +0000 (15:36 -0700)]
isisd: fix crash on processing own p2p hello

isis_pdu.c :
isisd crashes if router's own p2p hello packets get processed
thereby creating an adjacecncy with itself. Asserts at
isis_find_vertex. So discard own p2p IIH PDU and avoid
creating adjacency with self. This would also fix duplicate
systemID on an interface. These checks already exists for IS-IS
LAN Level 1/2 Hello PDU in process_lan_hello, but not for
point-to-point IIH PDUs.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 491417ac6383e2ea557951b24eb7bd3fffb69394)

8 years agoHACKING: Use space char for indentation.
Paul Jakma [Mon, 27 Oct 2014 15:14:06 +0000 (15:14 +0000)]
HACKING: Use space char for indentation.

* HACKING.tex: Whitespace/indent section is probably out of date. Rephrase.
  Remove the editor recommendations, as I don't know what would be correct.

Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
(cherry picked from commit 4da670b7a9aacf552aa11c4d4f6d994b312ada89)

8 years agoHACKING: Fix spelling mistakes
Paul Jakma [Mon, 27 Oct 2014 15:09:38 +0000 (15:09 +0000)]
HACKING: Fix spelling mistakes

Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
(cherry picked from commit f0996123fe12a0b5ea66b00475066474f48c84a0)

8 years agogdb: Add a directory of files with gdb macros
Paul Jakma [Wed, 29 Oct 2014 10:33:17 +0000 (10:33 +0000)]
gdb: Add a directory of files with gdb macros

* gdb/: Directory to contain files with GDB macros. Organised by topic into
  separate files.
* gdb/lib.txt: General OS API and Quagga lib macros:
  (def_ntohs) convert big-endian short to host order.
  (def_ntohl) convert big-endian long to host order.
  (walk_route_table_next) Walk to next route_node in a table, according
  to given top and current node arguments.
  (walk_route_table) walk the given route table dumping non-null info pointers,
  from the given root node.
  (dump_timeval) timeval to human readable output
  (dump_s_addr) Print IP address of given pointer to a (struct in_addr).s_addr
  (dump_s6_addr) Ditto for IPv6.
  (dump_prefix4) Dump a Quagga (struct prefix_ipv4 *)
  (dump_prefix6) Dump (struct prefix_ipv6 *)
  (dump_prefix) Dump a (struct prefix *).
  (rn_next_{down,up}) left-down and up-and-right walks of a route_table
  from a given route_node.
* gdb/ospfd.txt: ospfd specific gdb macros, depends on gdb/lib.txt
  (dump_ospf_lsa_flags) LSA flags to text.
  (dump_ospf_lsa_data) dump the data of a (struct lsa_header *) argument.
  (dump_ospf_lsa) Dump the details of a (struct ospf_lsa *)
  (walk_ospf_lsdb) Go through an LSDB, rooted at the
  given (struct route_node *), and dump LSA details.
  (ospf_backbone_lsdb_top) Get the LSDB top pointer for the given LSA type.

(cherry picked from commit 5bcbc3f58870bd28ab1deadfff75bf59d62db021)

8 years agozebra: fix NetBSD interface stats printf
David Lamparter [Tue, 21 Apr 2015 08:42:30 +0000 (10:42 +0200)]
zebra: fix NetBSD interface stats printf

"format '%qu' expects type 'long long unsigned int', but argument 3 has
type '__uint64_t'"

Move to %llu, which is more standard.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 193e78f2460a537695e34368a29fc5cd02e4e1f5)

8 years agotests: fix warnings
David Lamparter [Tue, 21 Apr 2015 08:02:23 +0000 (10:02 +0200)]
tests: fix warnings

While I don't see -Werror being used on tests anytime soon, there's no
reason to keep the warnings in tests unfixed.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit c313895dec3c176584d99f7b8684ddc3f9141d88)

8 years agozebra: silence zebra_serv_un unused warning
David Lamparter [Tue, 21 Apr 2015 07:47:57 +0000 (09:47 +0200)]
zebra: silence zebra_serv_un unused warning

zebra_serv_un() is unused if --enable-tcp-zebra is given.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 4b6c33282973c9e1545a519f2a51bda3cf42ae21)

8 years agobgpd: fix SNMP write support
David Lamparter [Tue, 3 Mar 2015 12:54:30 +0000 (13:54 +0100)]
bgpd: fix SNMP write support

This code - dating back to the initial import in 2002 - probably never
worked.  Calling asn_parse_int seems to always have been wrong, and in
the meantime, there no longer is a "struct variable *" argument for
write_method.  If anyone tried to use it, it'd probably have crashed.
(I didn't try.)

Fix this up so it actually works.  It's the only place in Quagga where a
SNMP write is actually supported, so it's an odd one out anyway, but
heh.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit d689d1a0c69726330d69b2dd412fdb8dcb23394b)

8 years agosnmp: fix warnings
David Lamparter [Wed, 4 Mar 2015 05:44:57 +0000 (06:44 +0100)]
snmp: fix warnings

batch-fix all warnings that come up when enabling AgentX SNMP support.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit dfee58f1d41a2e36c7f5f38a3ef5712224131824)

8 years agowatchquagga: break excessively long help string
David Lamparter [Tue, 3 Mar 2015 07:57:25 +0000 (08:57 +0100)]
watchquagga: break excessively long help string

watchquagga's command line help string exceeds the ISO C maximum string
length (4095 characters).  Just break it in two.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 33b9663a89b5ec319986de0673764d2a18ec8725)

8 years agolib: silence type range warning in macro
David Lamparter [Tue, 3 Mar 2015 07:56:48 +0000 (08:56 +0100)]
lib: silence type range warning in macro

While splitting up the CLI input macro is a bit annoying, this seems to
be the least annoying way to get rid of the "< 0" comparison warning for
unsigned long.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 81a4e85442e2011a47bbb25e8301dc40ec4ed9b6)

8 years agozebra: static int inline -> static inline int
David Lamparter [Fri, 10 Apr 2015 07:14:58 +0000 (09:14 +0200)]
zebra: static int inline -> static inline int

The BSD socket kernel interface had some weird ordering of function
attribute keywords. ("static int inline foobar()")

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3e9e2c9fb66895df42159b98a3743e25399760df)

8 years agozebra: use SA_SIZE for RT_ROUNDUP on FreeBSD
David Lamparter [Tue, 3 Mar 2015 20:04:20 +0000 (21:04 +0100)]
zebra: use SA_SIZE for RT_ROUNDUP on FreeBSD

FreeBSD provides SA_SIZE (and none of the other options to infer padded
size of a struct sockaddr).  Just define SAROUNDUP to SA_SIZE if it is
available.

This also drops a superfluous-looking extra macro branch which would
require ROUNDUP.  It seemed redundant to my eyes, but I have no idea
what odd things might have triggered addition of this in the first
place...

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 7e92322cfcc6c062acae3b550f90d36fe40763f1)

8 years agozebra, isisd: cast to unsigned char for ctypes
David Lamparter [Fri, 10 Apr 2015 07:14:30 +0000 (09:14 +0200)]
zebra, isisd: cast to unsigned char for ctypes

ctype.h macros take int as arguments, but expect arguments to be in
unsigned char's range.  Even though it probably works, this isn't
correct on systems that have a signed char type.  Cast explicitly.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 52f02b47685bc823c4c75560175a27aab0bd6709)

8 years agobgpd: fix signed vs unsigned compile error in bgp_routemap.c
Daniel Walton [Thu, 26 May 2016 02:52:36 +0000 (02:52 +0000)]
bgpd: fix signed vs unsigned compile error in bgp_routemap.c

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agobgpd: random() returns long
David Lamparter [Sun, 19 Apr 2015 12:40:02 +0000 (14:40 +0200)]
bgpd: random() returns long

bgpd was using unsigned to store a probability value to be used with
random().  That, however, returns long, running into some warnings (and
worst case, if RAND_MAX > UINT_MAX, won't work correctly.

Just use long to shuffle the value around.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 8c9cd85631b77fac0bc30ffb9f23b29c466d31c4)

8 years agobgpd: fix ecommunity_token initialiser
David Lamparter [Sun, 19 Apr 2015 13:17:02 +0000 (15:17 +0200)]
bgpd: fix ecommunity_token initialiser

This pulls up ecommunity_token_unknown to be the first enum value (at
0), and uses that as initialiser to get rid of the uninitialised use
warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b1672ce858cc9c16fd7cc67b673aa241d9583a59)

8 years agobgpd: Display of configured dampening parameters
Balaji [Mon, 16 Mar 2015 16:55:29 +0000 (16:55 +0000)]
bgpd: Display of configured dampening parameters

Function to display configured bgp dampening parameters.

Signed-off-by: Balaji.G <balajig81@gmail.com>
[DL: formatting adjustments]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 06bd420d4646333bc7ed9964e348f19a942fcfe2)

8 years ago*: remove stray extra semicolons
David Lamparter [Tue, 3 Mar 2015 07:53:18 +0000 (08:53 +0100)]
*: remove stray extra semicolons

Some places had extra semicolons where none belong.  Remove them.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b7d5021bfa161f797cbfb1e92bf5b94327fb1b71)

8 years agobgpd: Configured suppress value cannot be less than the reuse value in bgp dampening
Balaji [Mon, 16 Mar 2015 16:55:26 +0000 (16:55 +0000)]
bgpd: Configured suppress value cannot be less than the reuse value in bgp dampening

RFC 2439, Section 4.2; the values pair up for hysteresis.

Signed-off-by: Balaji.G <balajig81@gmail.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit aa7dbb1067b7d02e1354fe1e5664ccb7d259d649)

8 years agoFix alignment assumptions on non-RT_ROUNDUP platforms.
Greg Troxel [Mon, 23 Mar 2015 19:16:29 +0000 (15:16 -0400)]
Fix alignment assumptions on non-RT_ROUNDUP platforms.

The comment said that apple uses int and BSD traditionally used long,
but the code was backwards.  This fixes apple to be int, and otherwise
long.  That should make FreeBSD, which aligns to long, work correctly,
even without using SA_SIZE.

(cherry picked from commit 941789e470199df4f612368f669ecc0fd096fb9a)

8 years agobuild: list actual release procedure
David Lamparter [Sat, 7 Mar 2015 07:40:56 +0000 (08:40 +0100)]
build: list actual release procedure

As in a few other places in HACKING.tex, the text doesn't quite reflect
reality.  Add the actual release procedure including a few more steps,
and warn about autoconf's subdirectory behaviour.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit ec62e1438ece9af0546f9028aa1403f2c84bf177)

8 years agozebra: print "no link-detect"
David Lamparter [Mon, 2 Mar 2015 05:42:11 +0000 (06:42 +0100)]
zebra: print "no link-detect"

The default for this is slated to change, so let's print the current
default value for preexisting configurations.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 4c421215a0330b96d85879810558d40027a96ca6)

8 years agosolaris: fix SMF manifest dependency model and start method
Brian Bennett [Tue, 17 Feb 2015 23:26:12 +0000 (23:26 +0000)]
solaris: fix SMF manifest dependency model and start method

Resolves an issue where quagga daemons restart in an infinite loop.
Quagga daemons declare a dependency on zebra that requires a restart
of the daemon when zebra restarts and they explicitly restart zebra,
which again triggers their own restart.

Restarting zebra when other daemons are started is explicitly removed,
leaving dependency management up to SMF rather than handling it in the
start method.

solaris/quagga.init.in: Remove calls to routeadm_zebra_enable, and the
    routeadm_zebra_enable function.
solaris/quagga.xml.in: Set dependency zebra grouping to require_all.

Fixes: #818
Signed-off-by: Greg Troxel <gdt@ir.bbn.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 75a3cf6cf69f6ab940f8421b0f79b2b1f689b904)

8 years agobuild: Extend ip_mreq hack to DragonFlyBSD and SunOS
Brian Bennett [Tue, 17 Feb 2015 22:32:22 +0000 (22:32 +0000)]
build: Extend ip_mreq hack to DragonFlyBSD and SunOS

This extends the ip_mreq hack to DragonFlyBSD and SunOS. This has been
in pkgsrc for some time. I've cleaned up the pkgsrc patch a little and
am submitting it upstream. Credit is due to pkgsrc maintainers.

Tested on SmartOS (illumos).

Fixes: #819
Signed-off-by: Greg Troxel <gdt@ir.bbn.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit b8a893c38e97377b2a2582b1621b988e55811412)

8 years agobuild: enable AM_SILENT_RULES
David Lamparter [Tue, 10 Feb 2015 10:39:39 +0000 (11:39 +0100)]
build: enable AM_SILENT_RULES

This shuts up make by default (can be reversed with "make V=1" or
--disable-silent-rules).  This is useful since warnings and error
messages become more visible with less noise.

Tested on Linux with GNU make and FreeBSD with system's BSD make.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit cc81308148271aeed2277e16885ddca7e2d5bb9b)

8 years agodoc: fix some warnings
David Lamparter [Fri, 28 Nov 2014 07:40:58 +0000 (08:40 +0100)]
doc: fix some warnings

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit f16195c173f8e2e17ea35f143b6ffcd50c0619fb)

8 years agotests: remove --disable-ipv6
David Lamparter [Sat, 22 Nov 2014 18:31:44 +0000 (10:31 -0800)]
tests: remove --disable-ipv6

With --disable-ipv6 gone, the IPv6 detection logic in the tests is not
needed anymore either.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit 85c63b844df4a295a64f37573e0ba08a7cc63659)

8 years agozebra: remove netlink_route() it is no longer used
Daniel Walton [Thu, 26 May 2016 02:12:02 +0000 (02:12 +0000)]
zebra: remove netlink_route() it is no longer used

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
8 years agozebra: remove kernel_delete_ipv6_old()
David Lamparter [Sat, 28 Jun 2014 19:28:50 +0000 (21:28 +0200)]
zebra: remove kernel_delete_ipv6_old()

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>
(cherry picked from commit 51bdebad99fe813d1b7104543b352f0e39b1c8dc)

8 years agoAuthor: Timo Teräs <timo.teras@iki.fi>
Daniel Walton [Thu, 26 May 2016 01:49:34 +0000 (01:49 +0000)]
Author: Timo Teräs <timo.teras@iki.fi>
Date:   Tue Sep 30 11:31:53 2014 +0300

    bgpd: implement route-map set as-path prepend last-as

    It picks up the AS to add from the aspath, or uses the peers
    AS number. Useful mostly in iBGP setups.

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
Reviewed-by: Paul Jakma <paul@opensourcerouting.org>
8 years agobuild: remove bogus/deprecated inet_* tests
David Lamparter [Sat, 28 Jun 2014 18:22:55 +0000 (20:22 +0200)]
build: remove bogus/deprecated inet_* tests

These actually break configure on FreeBSD very subtly, because inet_aton
and __inet_aton are both detected, and then later other tests get
warnings about HAVE_INET_ATON being defined twice.

That said, they're incorrect to begin with since they detect alternative
functions but there is nothing in place to actually use these
alternates.

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>
(cherry picked from commit 79f74962d20fa2c90df5a57335fc3b5e19bfeccf)

8 years agoisisd: match adjacency with source of hellos
Amritha Nambiar [Wed, 28 Jan 2015 18:09:30 +0000 (18:09 +0000)]
isisd: match adjacency with source of hellos

isis_pdu.c: match adjacency with source of hellos,
check for source ID on receiving hello

If an adjacency exists, check the adjacency is with the
same router as the source of the hellos. In case a mismatch
is detected, bring down the adjacency and let the next
hellos trigger creating the new adjacency.

Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 3c28aaf437d8d473adb89c5e74574a61a9ea7cc6)

8 years agoisisd: fix crash on changing the circuit type of a passive interface
Lu Feng [Thu, 8 Jan 2015 01:21:02 +0000 (01:21 +0000)]
isisd: fix crash on changing the circuit type of a passive interface

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 92cff4f7cd7e805e6689e73e63029aaccd145eca)

8 years agoospfd: set O-bit in the option of all DD packets
Lu Feng [Thu, 8 Jan 2015 01:39:18 +0000 (01:39 +0000)]
ospfd: set O-bit in the option of all DD packets

If opaque-capability is enabled, we must set the O-bit in
the option field of all DD packets. Changing the option
field of DD packets may cause the peer to reset the state
back to ExStart.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 86ce951e349fd08d1ba2c66f5f6d07756689422a)

8 years agotests: fix tests for 1a211cb (missing well-known)
David Lamparter [Wed, 4 Feb 2015 06:26:03 +0000 (07:26 +0100)]
tests: fix tests for 1a211cb (missing well-known)

Fix tests/aspathtest.c again, this time by including a NEXT_HOP
attribute (which is out of correct order with AS_PATH, but that doesn't
matter here.)  This satisfies bgp_attr_check(), which after 1a211cb
refuses updates without nexthop attribute.

Fixes: 1a211cb ("one more fix for tightening of check for missing well-known attributes")
Cc: Paul Jakma <paul@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 143637198e333f0c822766b38f9d8cfe75c04e21)

8 years agoospfd: Fix initial Opaque LSA DB synchronisation
Olivier Dugeon [Mon, 3 Nov 2014 13:59:06 +0000 (14:59 +0100)]
ospfd: Fix initial Opaque LSA DB  synchronisation

ospfd has issues resynchronising its Opaque LSA DB with neighbours after restart
or interface events. The problem comes from opaque_lsa.c code that blocks
subsequent opaque LSA flooding until the neighbour router acknowledge that, and
removes the old opaque LSA from its LSDB. The bug comes from the fact that the
lock is never release, thus avoiding subsequent opaque LSA flooding.

More detail about the bugs and its solution is describeid in file
doc/te-link-params.md

Signed-off-by: Olivier Dugeon <olivier.dugeon@orange.com>
(cherry picked from commit 149210656045c363d8f59b97ad9251b0c06a15df)

8 years agolib: don't create circular lists (fixes 6d83113)
David Lamparter [Fri, 12 Dec 2014 20:35:28 +0000 (21:35 +0100)]
lib: don't create circular lists (fixes 6d83113)

LISTNODE_DETACH doesn't clear out the node, and LISTNODE_ATTACH doesn't
set ->next (since it assumes a fresh/zeroed listnode).  As a result, the
new listnode_move_to_tail() created a nice circular list, in turn
crashing ospfd in ospf_write() later.

Reported-by: Martin Winter <mwinter@netdef.org>
Fixes: 6d83113 ("ospfd: Tweak previous iface RR write patch to avoid free/malloc & redundant log")
Cc: Paul Jakma <paul@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Acked-by: Greg Troxel <gdt@ir.bbn.com>
Acked-by: Dinesh Dutt <ddutt@cumulusnetworks.com>
Acked-by: Vincent JARDIN <vincent.jardin@6wind.com>
(cherry picked from commit 1c6db0d2da34044ddfb42665fda8a3387ecc451d)

8 years agobgpd: set BGP_ATTR_MP_[UN]REACH_NLRI (fixes 1a211cb)
David Lamparter [Mon, 8 Dec 2014 16:42:12 +0000 (17:42 +0100)]
bgpd: set BGP_ATTR_MP_[UN]REACH_NLRI (fixes 1a211cb)

Unfortunately, the attribute present bits for MP_REACH and MP_UNREACH
which 1a211cb ("bgpd: one more fix"...) tests for are never set in their
corresponding attribute parsing functions.

Reported-by: Martin Winter <mwinter@netdef.org>
Fixes: 1a211cb "bgpd: one more fix for tightening of check for missing well-known attributes"
Cc: Paul Jakma <paul@opensourcerouting.org>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit daefeb8755e194dd19a5f1910bc78d13c8147efb)

8 years agozebra/kernel_socket.c: Use platform alignment
Greg Troxel [Tue, 2 Dec 2014 19:51:49 +0000 (14:51 -0500)]
zebra/kernel_socket.c: Use platform alignment

Use the platform-provided RT_ROUNDUP macro to align sockaddrs on the
routing socket, rather than using hard-coded assumptions about
alignment.  Emit a warning if the OS doesn't define alignment macros.

Resolves failure of ripngd on NetBSD 6 i386, which changed alignment
to uint64_t from long.

(cherry picked from commit 273b1bd341afff86ba571e0be296d88dba627136)

8 years agodoc: Document 'set as-path prepend' and 'set as-path prepend last-as'
Paul Jakma [Mon, 20 Oct 2014 16:49:44 +0000 (17:49 +0100)]
doc: Document 'set as-path prepend' and 'set as-path prepend last-as'

(cherry picked from commit 5e4ba81dc212b172e715afa7b6ea668cddd8485d)

8 years agobgpd: trivial, remove unneeded extra variable in bgp_capability_restart
Paul Jakma [Tue, 14 Oct 2014 10:14:06 +0000 (11:14 +0100)]
bgpd: trivial, remove unneeded extra variable in bgp_capability_restart

(cherry picked from commit ec98d90767b341877fb7f1547f025b946955899a)

8 years agomake some structures constant.
Stephen Hemminger [Mon, 3 Nov 2014 01:20:09 +0000 (01:20 +0000)]
make some structures constant.

These pre-initialized arrays are not modified.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 88d37b902bc8127379d3293b9671aa6a11479c23)

8 years agotests: fix tests for 055086f (well-known attr check)
David Lamparter [Thu, 30 Oct 2014 05:42:00 +0000 (06:42 +0100)]
tests: fix tests for 055086f (well-known attr check)

Fix tests/aspathtest.c by including an ORIGIN attribute in the
testcases.  After 055086f "bgpd: well-known attr check only run for
v4/uni, which could cause a crash," we're now checking for it and tests
are failing due to that.

Note that test #11 ("4b AS4_PATH w/o AS_PATH") is no longer accepted as
OK since the function now checks for the existence of an AS_PATH attr.

Fixes: 055086f ("bgpd: well-known attr check only run for v4/uni"...)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit c68f6d9dbb9f910d3ee82e099655fff7c12ef856)

8 years agobuild: fix 9562a77... (mrlg removal)
David Lamparter [Thu, 30 Oct 2014 05:19:15 +0000 (06:19 +0100)]
build: fix 9562a77... (mrlg removal)

mrlg.cgi was removed in 9562a77 "mrlg: Remove obsolete version." but the
file was still listed in Makefile.am.

Fixes: 9562a77 ("mrlg: Remove obsolete version.")
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 59135bde25441cd39cea0389467eb206fc9030c9)

8 years agomrlg: Remove obsolete version.
Paul Jakma [Tue, 21 Oct 2014 09:59:45 +0000 (10:59 +0100)]
mrlg: Remove obsolete version.

* mrlg.cgi: The version we shipped was very much  out of date, remove it.
* mrlg.txt: Add file pointing to the official MRLG site.

(cherry picked from commit 9562a7774b76df050d3e01632c6203796dc72c87)

8 years agoHandy guidelines to contribute
Vincent JARDIN [Mon, 27 Oct 2014 13:03:14 +0000 (13:03 +0000)]
Handy guidelines to contribute

Explain how to be a nice contributor in a handy way.

Signed-off-by: Vincent JARDIN <vincent.jardin@6wind.com>
Acked-by: Paul Jakma <paul@jakma.org>
(cherry picked from commit f80ba04074f1211d857d08d6deddc41d029be1c7)

8 years agoospfd: Don't leave stale RouterLSA's when changing areaID
Joakim Tjernlund [Tue, 9 Mar 2010 06:42:30 +0000 (06:42 +0000)]
ospfd: Don't leave stale RouterLSA's when changing areaID

Signed-off-by: Joakim Tjernlund <Joakim.Tjernlund@transmode.se>
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 6b274d90fa9b0c9f43e3ca9494cd78df1ccad14e)

8 years agostream: remove unused stream_read_unblock
Stephen Hemminger [Wed, 13 Jan 2010 00:32:43 +0000 (00:32 +0000)]
stream: remove unused stream_read_unblock

The one place this was being used in BGP is now gone,
can remove deprecated interface.
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit 3790eb0d3f0bbb24b9c6be97f547cec144ee05d1)

8 years agoBug in ospf6_lsa_compare()
Yasuhiro Ohara [Thu, 17 Dec 2009 05:41:17 +0000 (05:41 +0000)]
Bug in ospf6_lsa_compare()

This fix is probably correct on 32bit systems,
but i think it will not work on 64bit systems.
sizeof(signed long) would be 8 and therefore the
cast from u_int32_t will map all the values to
non-negative part of long int.

You would like to use int (like in ospfd) and
change the type of seqnuma, seqnumb to that.

The type int32_t would be even more proper, but
sizeof(int) is 4 on relevant platforms.

Signed-off: Ondrej Zajicek <santiago@crfreenet.org>
Acked-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Yasuhiro Ohara <yasu@jaist.ac.jp>
(cherry picked from commit bdd8cd70a042473477f9144c9cedb8dde11ba2c1)

8 years agoospfd: invalid MD5 auth_key?
Joakim Tjernlund [Thu, 26 Nov 2009 12:23:07 +0000 (12:23 +0000)]
ospfd: invalid MD5 auth_key?

This looks fishy in ospf_make_md5_digest()
if (list_isempty (OSPF_IF_PARAM (oi, auth_crypt)))
    auth_key = (const u_int8_t *) "";
...
MD5Update(&ctx, auth_key, OSPF_AUTH_MD5_SIZE);
auth_key points to a "" string of len 1 which is a lot
smaller that OSPF_AUTH_MD5_SIZE. Is this intentional to
get some random data or just a plain bug?

Anyone using MD5 should have a closer look and decide
what to do.
Acked-by: Feng Lu <lu.feng@6wind.com>
(cherry picked from commit ea2a598411cc7bd20456849e56bbc9e93c9916e7)

8 years agodocs: defines.texi include seems to want to be after setfilename
Paul Jakma [Thu, 9 Oct 2014 15:09:10 +0000 (16:09 +0100)]
docs: defines.texi include seems to want to be after setfilename

* quagga.texi: I'm getting warnings about stuff in defines.texi not being
  defined when building quagga.info. Seems to be fixed by moving the include
  of defines.texi to the end of the header. Also, the Texinfo docs suggest
  setfilename must go first.

(cherry picked from commit 384d7ad98c109e92eaf65bf10a3256e5657639c3)

8 years agozebra: Build the test client, can be useful, and add IPv6 to testrib.conf
Paul Jakma [Thu, 9 Oct 2014 09:51:41 +0000 (10:51 +0100)]
zebra: Build the test client, can be useful, and add IPv6 to testrib.conf

(cherry picked from commit 7a6eec54eaffa82f4f03363314bb81c400eb2a66)

8 years agoFreeBSD has changed its SOCK_RAW for being truly raw.
Olivier Cochard-Labbé [Thu, 9 Oct 2014 09:28:21 +0000 (10:28 +0100)]
FreeBSD has changed its SOCK_RAW for being truly raw.

(cherry picked from commit f6444e4f6e1664f49f7552f894c8c94e45dd3c35)

8 years ago[lib] Add support for backtrace on more platforms
Joakim Tjernlund [Thu, 25 Jun 2009 15:40:06 +0000 (16:40 +0100)]
[lib] Add support for backtrace on more platforms

* lib/sigevent.c: (program_counter) extend to support more platforms. Joint
  effort with Paul Jakma.

(cherry picked from commit b166ea2dda9f04a8b75e0bf5adb7064580695f22)

8 years agolib/plist: Add some required parentheses, according to clang-analyzer
Paul Jakma [Fri, 19 Sep 2014 15:55:46 +0000 (16:55 +0100)]
lib/plist: Add some required parentheses, according to clang-analyzer

(cherry picked from commit 18f420e9f99e7f6557cf5877673cd6e71ac32192)

8 years agoripng_nexthop: remove unused store to variable
Paul Jakma [Fri, 19 Sep 2014 14:35:54 +0000 (15:35 +0100)]
ripng_nexthop: remove unused store to variable

(cherry picked from commit 16f1606382b77ac6b951ea0de15384fcbc1df73f)

8 years agoospf6_lsdb: trivial, make it clear that showfunc is set before deref.
Paul Jakma [Fri, 19 Sep 2014 14:35:15 +0000 (15:35 +0100)]
ospf6_lsdb: trivial, make it clear that showfunc is set before deref.

(cherry picked from commit 7bef33cbf5027189bd55e4890a07a6bef8277f93)

8 years agoAdd missing GPL headers, and copyright claims that certainly apply.
Paul Jakma [Tue, 16 Sep 2014 10:53:49 +0000 (11:53 +0100)]
Add missing GPL headers, and copyright claims that certainly apply.

* Fix (a subset of)? files with non-trivial code that are missing GPL headers.

* A few copyright claims added which I am certain apply, but which I had
  missed out on the original commits.

NB: Copyright claims are not exclusive and the addition of any copyright
claim should not be read as implying a lack of any further claims, or
denying the validity of any other claims.  All those with claims of
copyright over any portion of Quagga are welcome to submit them, ideally as
patches to update copyright strings in files.

(cherry picked from commit 010ebbbca6396f272cc2d50d147dd922dda68213)

8 years agoHACKING: remove an unneeded escape
Paul Jakma [Fri, 19 Oct 2012 11:02:42 +0000 (12:02 +0100)]
HACKING: remove an unneeded escape

(cherry picked from commit d4a8607d12e1d3f655055647f1633ec154685545)

8 years agoripd: use only one constant for derivation
Lu Feng [Wed, 25 Jun 2014 07:43:15 +0000 (07:43 +0000)]
ripd: use only one constant for derivation

RIP_MAX_RTE is defined in ripd.h as 25 but is in fact the
result of a formula. More over it is not used in the code:
the code itself includes the fomula. This makes it un-clear
for maintenance.

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Reviewed-by: Alain Ritoux <alain.ritoux@6wind.com>
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from commit 342a31bfda21616209366679ac522471e5772a2f)

8 years agobgpd: route-map: share aspath object compilation code where possible
Timo Teräs [Tue, 20 May 2014 06:04:49 +0000 (09:04 +0300)]
bgpd: route-map: share aspath object compilation code where possible

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
(cherry picked from commit b304dcb8abc4e5b93f86a4024990980746e730be)

8 years agobgpd: fix route-map comments
Timo Teräs [Tue, 20 May 2014 05:57:26 +0000 (08:57 +0300)]
bgpd: fix route-map comments

Signed-off-by: Timo Teräs <timo.teras@iki.fi>
(cherry picked from commit 2aa640bd78b64821bde9a53ecdd1e96e91b20ae4)

8 years agopimd: Fix some static analysis
Donald Sharp [Thu, 26 May 2016 00:36:10 +0000 (20:36 -0400)]
pimd: Fix some static analysis

Using && instead of &.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoquagga: Fix bug in handling of --enable-shell-access
Donald Sharp [Wed, 25 May 2016 23:53:09 +0000 (19:53 -0400)]
quagga: Fix bug in handling of --enable-shell-access

The macro to expand and handle --enable-shell-access was
broken.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agobuild: Remove the old PIC/PIE patch, let libtool sort it out
Paul Jakma [Thu, 20 Aug 2015 20:30:17 +0000 (21:30 +0100)]
build: Remove the old PIC/PIE patch, let libtool sort it out

* Remove the old change from '08 to add in PIE arguments at automake level.
  Versions of libtool since then know how to deal with -fpie and do the right
  thing according to whether its building shared or executable objects.
  So just pass '-fpie' as CFLAG and let libtool do its thing.

8 years agopimd: Clean up some more compile warnings
Donald Sharp [Wed, 25 May 2016 23:43:00 +0000 (19:43 -0400)]
pimd: Clean up some more compile warnings

Turns out we were missing $(WERROR) for compiling pimd
so we were not catching compile warning issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix SPT bit initial setting
Donald Sharp [Thu, 12 Nov 2015 15:54:04 +0000 (07:54 -0800)]
pimd: Fix SPT bit initial setting

The initial setting of the SPT bit was incorrect.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix pim_upstream_find to match on INADDR_ANY for source
Donald Sharp [Wed, 4 Nov 2015 00:39:40 +0000 (16:39 -0800)]
pimd: Fix pim_upstream_find to match on INADDR_ANY for source

Fix the pim_upstream_find code to match on INADDR_ANY for source.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agoPimd: pim register send is being sent and received at the RP
Donald Sharp [Thu, 29 Oct 2015 18:27:39 +0000 (11:27 -0700)]
Pimd: pim register send is being sent and received at the RP

Modify the code to send a register packet upstream to the RP.
Packet is currently being received but not properly decoded
currently.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Modify NOCACHE code to create (S,G) route
Donald Sharp [Thu, 29 Oct 2015 13:41:24 +0000 (06:41 -0700)]
pimd: Modify NOCACHE code to create (S,G) route

The code was hard-coding the (S,G) route to get the
multicast packet up into pimd.  This code fixes
this issue.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Create special pimreg interface
Donald Sharp [Thu, 29 Oct 2015 13:35:12 +0000 (06:35 -0700)]
pimd: Create special pimreg interface

The linux kernel wants a pimreg vif device.  The pimd
code wants a 'struct interface *' for anything it works
with.  Since the pimreg vif device is not a real linux
device that zebra knows about.  Cheat by creating
a pimreg interface pointer and setup the code to
properly be able to handle the registration of the vif
device.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Fix some file inclusion issues.
Donald Sharp [Wed, 28 Oct 2015 19:22:22 +0000 (12:22 -0700)]
pimd: Fix some file inclusion issues.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Move add_oif into pim_oil.c
Donald Sharp [Wed, 28 Oct 2015 18:00:37 +0000 (11:00 -0700)]
pimd: Move add_oif into pim_oil.c

This commit does two things:
(A) Sets up #defines for the pimreg to be used in pim_mroute.c
(B) Moves add_oif into pim_oil.c where it belongs

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Add New Source type for where a (S,G) mroute is learned
Donald Sharp [Wed, 28 Oct 2015 17:14:06 +0000 (10:14 -0700)]
pimd: Add New Source type for where a (S,G) mroute is learned

Add Source type for (S,G) mroute.  This will allow us to know that
a (S,G) route came from an actual Source( ie the kernel called us
back with information about a multicast packet it received with
no mroute for it ).

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Convert the RP(G) code to return a struct pim_rpf
Donald Sharp [Wed, 28 Oct 2015 14:00:31 +0000 (07:00 -0700)]
pimd: Convert the RP(G) code to return a struct pim_rpf

This will facilitate sending packets to the right spot

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agolib: Fix compile warnings with zlog_hexdump
Donald Sharp [Wed, 25 May 2016 23:14:36 +0000 (19:14 -0400)]
lib: Fix compile warnings with zlog_hexdump

When using zlog_hexdump tell the compiler that we don't expect
to actually change the memory.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
8 years agopimd: Modify the RP data structure.
Donald Sharp [Tue, 27 Oct 2015 20:13:23 +0000 (13:13 -0700)]
pimd: Modify the RP data structure.

Modify the RP data structure to know how to get to it from here.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>