Revision 852b7062

View differences:

nest/rt-table.c
354 354
  int c;
355 355
  net *n = e->net;
356 356

  
357
  if (ipa_nonzero(ipa_and(n->n.prefix, ipa_not(ipa_mkmask(n->n.pxlen)))))
357
  if ((n->n.pxlen > BITS_PER_IP_ADDRESS) || !ip_is_prefix(n->n.prefix,n->n.pxlen))
358 358
    {
359 359
      log(L_BUG "Ignoring bogus prefix %I/%d received via %s",
360 360
	  n->n.prefix, n->n.pxlen, e->sender->name);
proto/bgp/packets.c
219 219
  ip_addr a;
220 220
  int bytes;
221 221

  
222
  while (!EMPTY_LIST(buck->prefixes) && remains >= 5)
222
  while (!EMPTY_LIST(buck->prefixes) && remains >= (1+sizeof(ip_addr)))
223 223
    {
224 224
      struct bgp_prefix *px = SKIP_BACK(struct bgp_prefix, bucket_node, HEAD(buck->prefixes));
225 225
      DBG("\tDequeued route %I/%d\n", px->n.prefix, px->n.pxlen);

Also available in: Unified diff