+2006-05-04 Paul Jakma <paul.jakma@sun.com>
+
+ * (general) VPNv4 fixes. Certain VPNv4 code was not enabled.
+ See bug #210.
+ * bgp_attr.{c,h}: (bgp_packet_{withdraw,attribute}) Tag should be
+ u_char really.
+ * bgp_packet.c: (bgp_{update,withdraw}_packet) Enable some
+ VPNv4 code which inexplicably was ifdef'd out. comments from
+ a tester on IRC suggest this fixes bug #210.
+
2006-03-30 Paul Jakma <paul.jakma@sun.com>
* bgp_community.c: (community_gettoken) Unknown token should
bgp_packet_attribute (struct bgp *bgp, struct peer *peer,
struct stream *s, struct attr *attr, struct prefix *p,
afi_t afi, safi_t safi, struct peer *from,
- struct prefix_rd *prd, char *tag)
+ struct prefix_rd *prd, u_char *tag)
{
size_t cp;
unsigned int aspath_data_size;
bgp_size_t
bgp_packet_withdraw (struct peer *peer, struct stream *s, struct prefix *p,
afi_t afi, safi_t safi, struct prefix_rd *prd,
- char *tag)
+ u_char *tag)
{
unsigned long cp;
unsigned long attrlen_pnt;
extern bgp_size_t bgp_packet_attribute (struct bgp *bgp, struct peer *,
struct stream *, struct attr *,
struct prefix *, afi_t, safi_t,
- struct peer *, struct prefix_rd *, char *);
+ struct peer *, struct prefix_rd *, u_char *);
extern bgp_size_t bgp_packet_withdraw (struct peer *peer, struct stream *s,
struct prefix *p, afi_t, safi_t,
- struct prefix_rd *, char *);
+ struct prefix_rd *, u_char *);
extern void bgp_dump_routes_attr (struct stream *, struct attr *,
struct prefix *);
extern unsigned int attrhash_key_make (struct attr *);
bgp_size_t total_attr_len = 0;
unsigned long pos;
char buf[BUFSIZ];
- struct prefix_rd *prd = NULL;
- char *tag = NULL;
s = peer->work;
stream_reset (s);
adj = adv->adj;
if (adv->binfo)
binfo = adv->binfo;
-#ifdef MPLS_VPN
- if (rn)
- prd = (struct prefix_rd *) &rn->prn->p;
- if (binfo)
- tag = binfo->tag;
-#endif /* MPLS_VPN */
/* When remaining space can't include NLRI and it's length. */
if (rn && STREAM_REMAIN (s) <= BGP_NLRI_LENGTH + PSIZE (rn->p.prefixlen))
/* If packet is empty, set attribute. */
if (stream_empty (s))
{
+ struct prefix_rd *prd = NULL;
+ u_char *tag = NULL;
+
+ if (rn->prn)
+ prd = (struct prefix_rd *) &rn->prn->p;
+ if (binfo)
+ tag = binfo->tag;
+
bgp_packet_set_marker (s, BGP_MSG_UPDATE);
stream_putw (s, 0);
pos = stream_get_endp (s);
bgp_size_t unfeasible_len;
bgp_size_t total_attr_len;
char buf[BUFSIZ];
- struct prefix_rd *prd = NULL;
s = peer->work;
stream_reset (s);
{
adj = adv->adj;
rn = adv->rn;
-#ifdef MPLS_VPN
- prd = (struct prefix_rd *) &rn->prn->p;
-#endif /* MPLS_VPN */
if (STREAM_REMAIN (s)
< (BGP_NLRI_LENGTH + BGP_TOTAL_ATTR_LEN + PSIZE (rn->p.prefixlen)))
stream_put_prefix (s, &rn->p);
else
{
+ struct prefix_rd *prd = NULL;
+
+ if (rn->prn)
+ prd = (struct prefix_rd *) &rn->prn->p;
pos = stream_get_endp (s);
stream_putw (s, 0);
total_attr_len