[bgpd] minor changes to bgp_mp_reach_parse

2008-06-07 Paul Jakma <paul@jakma.org>

	* bgp_attr.{c,h}: (bgp_mp_{un,}reach_parse) export, for unit tests.
	* bgp_attr.c: (bgp_mp_reach_parse) Add logging. Tighten length test
	  to bounds check against the attribute length rather than the
	  stream length..
diff --git a/bgpd/bgp_attr.h b/bgpd/bgp_attr.h
index e152b9f..9647ccf 100644
--- a/bgpd/bgp_attr.h
+++ b/bgpd/bgp_attr.h
@@ -176,4 +176,9 @@
 /* Transit attribute prototypes. */
 void transit_unintern (struct transit *);
 
+/* Exported for unit-test purposes only */
+extern int bgp_mp_reach_parse (struct peer *, bgp_size_t, struct attr *,
+			       struct bgp_nlri *);
+extern int bgp_mp_unreach_parse (struct peer *, bgp_size_t, struct bgp_nlri *);
+
 #endif /* _QUAGGA_BGP_ATTR_H */