modernize backfire 10.03 so it can be operational again
[openwrt-10.03/.git] / package / quagga / patches-upstream / 150-unknown_afi.patch
1 --- a/bgpd/bgp_packet.c
2 +++ b/bgpd/bgp_packet.c
3 @@ -1631,7 +1631,7 @@ bgp_update_receive (struct peer *peer, b
4      NLRI_TYPE_MAX,
5    };
6    struct bgp_nlri nlris[NLRI_TYPE_MAX];
7 -
8 +  
9    /* Status must be Established. */
10    if (peer->status != Established) 
11      {
12 @@ -1645,6 +1645,7 @@ bgp_update_receive (struct peer *peer, b
13    memset (&attr, 0, sizeof (struct attr));
14    memset (&extra, 0, sizeof (struct attr_extra));
15    memset (&nlris, 0, sizeof nlris);
16 +  
17    attr.extra = &extra;
18  
19    s = peer->ibuf;
20 @@ -1781,6 +1782,8 @@ bgp_update_receive (struct peer *peer, b
21    /* Parse any given NLRIs */
22    for (i = NLRI_UPDATE; i < NLRI_TYPE_MAX; i++)
23      {
24 +      if (!nlris[i].nlri) continue;
25 +      
26        /* We use afi and safi as indices into tables and what not.  It would
27         * be impossible, at this time, to support unknown afi/safis.  And
28         * anyway, the peer needs to be configured to enable the afi/safi