zebra: route_unlock_node is missing in "show ip[v6] route <prefix>" commands

Signed-off-by: Feng Lu <lu.feng@6wind.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
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>
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>
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>
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>
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>
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.
bgpd: Fixes for recent well-known-attr check patch.

* bgp_attr.c: Recent patch to tighten well-known attr checks and apply that
  to all AFIs has some breakage with MP-extensions and GR, which needs to be
  fixed.
  (bgp_attr_check) Graceful Restart EoR can be an empty UPDATE for IPv4/uni.
  MP-Ext allow UPDATE with just MP_UNREACH_NLRI. Check for these and return
  proceed.
  NEXT_HOP becomes optional, if MP_REACH_NLRI is present and there's no
  v4 NLTI, update NEXT_HOP check accordingly.
  Print the missing attr in string form in the log message.
  (bgp_attr_parse) AS_PATH need not be there, so
  bgp_attr_munge_as4_attrs call needs to be conditional on that.
zebra: Set link-detect on by default

Signed-off-by: Roopa Prabhu <roopa@cumulusnetworks.com>
Reviewed-by: Dinesh G Dutt <ddutt at cumulusnetworks.com>
Reviewed-by: Scott Feldman <sfeldma at cumulusnetworks.com>
Revert "zebra: Set link-detect on by default"

This reverts commit 773224404cb33b2dbd3d8d8d2572013603995ce4.

This patch is nontrivial but wasn't passed along on the mailing list;
this is a revert purely on procedural reasons.

Signed-off-by: David Lamparter <equinox@diac24.net>
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>
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>
zebra: MBGP routes should not be installed in the kernel

MBGP routes are used only for PIM RPF checks and hence should
not be installed in the kernel's FIB. Ignore route node set to Multicast
SAFI.

Signed-off-by: Balaji.G <balajig81@gmail.com>
Acked-by: Everton Marques <everton.marques@gmail.com>
[pushed down rn->table->info assignment below assert]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
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>