At boot it appears that some BGP prefixes can be learned, and advertised to peers, before route-map/prefix-list filters can be applied. I had a peer report to me that I was advertising excessive route count in the past, but could never find a cause. Today after a reboot of two different routers, they both exhibited this behavior.
After a reboot on a router with multiple iBGP and eBGP peers:
$ show ip bgp neighbors x.x.x.x advertised-routes
BGP table version is 428428, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.y.w.0/24 x.x.x.x 100 0 i
*> 10.y.x.0/24 x.x.x.x 100 0 i
*> 10.y.y.0/24 x.x.x.x 100 0 i
*> 10.y.z.0/24 x.x.x.x 100 0 i
<... lots of prefixes ... >
Total number of prefixes 23
$ clear ip bgp x.x.x.x
$ show ip bgp neighbors x.x.x.x advertised-routes
BGP table version is 471584, local router ID is x.x.x.x
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
<... correct prefixes based on filters, nothing from 10.* etc... >
Total number of prefixes 7
Note this is with no configuration changes of any kind on the router after boot. Simply logged in, looked at advertised routes, reset the session, and looked again. On one of the routers there were about 2400 such extra prefixes being advertised (out of more than 100K we carry) so it seems like the filters were applied during the process of learning and advertising prefixes and the bleeding stopped.
This is a very serious problem since leaking prefixes to peers can, if your peers don't filter well enough, lead to massive routing problems and downtime for both networks. Please place a high priority on this one...
-Adam