| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197 |
- --- ripd/ripd.c
- +++ ripd/ripd.c
- @@ -51,6 +51,10 @@
-
- /* RIP queries. */
- long rip_global_queries = 0;
- +
- +/* Should we trust netmasks or rather apply_classful_mask_ipv4()
- + in rip_output_process() ? */
- +char rip_should_trust_netmasks = 0;
-
- /* Prototypes. */
- void rip_event (enum rip_event, int);
- @@ -1963,7 +1967,9 @@
- zlog_info("%s/%d before RIPv1 mask check ",
- inet_ntoa (classfull.prefix), classfull.prefixlen);
-
- - apply_classful_mask_ipv4 (&classfull);
- + if (!rip_should_trust_netmasks)
- + apply_classful_mask_ipv4 (&classfull);
- +
- p = &classfull;
-
- if (IS_RIP_DEBUG_PACKET)
- @@ -2705,6 +2711,26 @@
-
- return CMD_SUCCESS;
- }
- +
- +DEFUN (rip_trust_netmasks,
- + rip_trust_netmasks_cmd,
- + "trust netmasks",
- + "Tell Zebra to trust netmasks and not to recalculate them.\n"
- + "Netmasks will be trusted.\n")
- +{
- + rip_should_trust_netmasks = 1;
- + return CMD_SUCCESS;
- +}
- +
- +DEFUN (no_rip_trust_netmasks,
- + no_rip_trust_netmasks_cmd,
- + "no trust netmasks",
- + "Tell Zebra not to trust netmasks and recalculate them.\n"
- + "Netmasks will be recalculated.\n")
- +{
- + rip_should_trust_netmasks = 0;
- + return CMD_SUCCESS;
- +}
-
- struct route_table *rip_distance_table;
-
- @@ -3503,6 +3529,8 @@
- install_element (RIP_NODE, &no_rip_distance_source_cmd);
- install_element (RIP_NODE, &rip_distance_source_access_list_cmd);
- install_element (RIP_NODE, &no_rip_distance_source_access_list_cmd);
- + install_element (RIP_NODE, &rip_trust_netmasks_cmd);
- + install_element (RIP_NODE, &no_rip_trust_netmasks_cmd);
-
- /* Debug related init. */
- rip_debug_init ();
- --- zebra/ioctl.c.orig Tue Oct 23 11:31:29 2001
- +++ zebra/ioctl.c Fri Oct 4 19:45:04 2002
- @@ -349,6 +349,7 @@
- int ret;
- struct ifreq ifreq;
-
- + bzero(&ifreq, sizeof(struct ifreq));
- ifreq_set_name (&ifreq, ifp);
-
- ifreq.ifr_flags = ifp->flags;
- @@ -371,6 +372,7 @@
- int ret;
- struct ifreq ifreq;
-
- + bzero(&ifreq, sizeof(struct ifreq));
- ifreq_set_name (&ifreq, ifp);
-
- ifreq.ifr_flags = ifp->flags;
- @@ -473,6 +475,9 @@
- mask.sin6_len = sizeof (struct sockaddr_in6);
- #endif
- memcpy (&addreq.ifra_prefixmask, &mask, sizeof (struct sockaddr_in6));
- +
- + addreq.ifra_lifetime.ia6t_vltime = 0xffffffff;
- + addreq.ifra_lifetime.ia6t_pltime = 0xffffffff;
-
- addreq.ifra_lifetime.ia6t_pltime = ND6_INFINITE_LIFETIME;
- addreq.ifra_lifetime.ia6t_vltime = ND6_INFINITE_LIFETIME;
- --- lib/vty.h.orig Sun Aug 18 16:34:00 2002
- +++ lib/vty.h Wed Mar 12 11:10:05 2003
- @@ -128,7 +128,7 @@
- };
-
- /* Integrated configuration file. */
- -#define INTEGRATE_DEFAULT_CONFIG "Zebra.conf"
- +#define INTEGRATE_DEFAULT_CONFIG "zebra.conf.integrate"
-
- /* Small macro to determine newline is newline only or linefeed needed. */
- #define VTY_NEWLINE ((vty->type == VTY_TERM) ? "\r\n" : "\n")
- Index: bgpd/bgp_aspath.c
- --- bgpd/bgp_aspath.c 19 Jun 2002 09:04:48 -0000 1.63
- +++ bgpd/bgp_aspath.c 23 Oct 2002 09:24:47 -0000 1.64
- @@ -1117,13 +1117,16 @@
- {
- unsigned int key = 0;
- int length;
- - caddr_t pnt;
- + unsigned short *pnt;
-
- - length = aspath->length;
- - pnt = aspath->data;
- + length = aspath->length / 2;
- + pnt = (unsigned short *) aspath->data;
-
- while (length)
- - key += pnt[--length];
- + {
- + key += *pnt++;
- + length--;
- + }
-
- return key;
- }
- Index: bgpd/bgp_packet.c
- --- bgpd/bgp_packet.c 21 Aug 2002 03:44:34 -0000 1.163
- +++ bgpd/bgp_packet.c 19 Mar 2003 11:11:11 -0000 1.165
- @@ -238,7 +238,6 @@
- bgp_packet_set_size (s);
- packet = bgp_packet_dup (s);
- bgp_packet_add (peer, packet);
- - BGP_WRITE_ON (peer->t_write, bgp_write, peer->fd);
- stream_reset (s);
- return packet;
- }
- Index: bgpd/bgp_route.c
- --- bgpd/bgp_route.c 21 Aug 2002 03:44:34 -0000 1.402
- +++ bgpd/bgp_route.c 28 Feb 2003 22:24:45 -0000 1.404
- @@ -620,7 +620,10 @@
- if (transparent || reflect
- || (CHECK_FLAG (peer->af_flags[afi][safi], PEER_FLAG_NEXTHOP_UNCHANGED)
- && ((p->family == AF_INET && attr->nexthop.s_addr)
- - || (p->family == AF_INET6 && ri->peer != bgp->peer_self))))
- +#ifdef HAVE_IPV6
- + || (p->family == AF_INET6 && ri->peer != bgp->peer_self)
- +#endif /* HAVE_IPV6 */
- + )))
- {
- /* NEXT-HOP Unchanged. */
- }
- @@ -2859,7 +2862,7 @@
- if ((aggregate = rn->info) != NULL && rn->p.prefixlen < p->prefixlen)
- {
- bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
- - bgp_aggregate_route (bgp, &rn->p, ri, safi, safi, NULL, aggregate);
- + bgp_aggregate_route (bgp, &rn->p, ri, afi, safi, NULL, aggregate);
- }
- bgp_unlock_node (child);
- }
- @@ -2886,7 +2889,7 @@
- if ((aggregate = rn->info) != NULL && rn->p.prefixlen < p->prefixlen)
- {
- bgp_aggregate_delete (bgp, &rn->p, afi, safi, aggregate);
- - bgp_aggregate_route (bgp, &rn->p, NULL, safi, safi, del, aggregate);
- + bgp_aggregate_route (bgp, &rn->p, NULL, afi, safi, del, aggregate);
- }
- bgp_unlock_node (child);
- }
- Index: bgpd/bgpd.c
- --- bgpd/bgpd.c 18 Aug 2002 14:10:29 -0000 1.342
- +++ bgpd/bgpd.c 6 Feb 2003 15:47:50 -0000 1.345
- @@ -797,6 +797,13 @@
- type = peer_sort (peer);
- peer->as = as;
-
- + if (bgp_config_check (peer->bgp, BGP_CONFIG_CONFEDERATION)
- + && ! bgp_confederation_peers_check (peer->bgp, as)
- + && peer->bgp->as != as)
- + peer->local_as = peer->bgp->confed_id;
- + else
- + peer->local_as = peer->bgp->as;
- +
- /* Advertisement-interval reset */
- if (peer_sort (peer) == BGP_PEER_IBGP)
- peer->v_routeadv = BGP_DEFAULT_IBGP_ROUTEADV;
- Index: ospfd/ospf_packet.c
- --- ospfd/ospf_packet.c.orig Thu Jul 4 05:06:41 2002
- +++ ospfd/ospf_packet.c Fri Mar 28 00:05:26 2003
- @@ -276,7 +276,7 @@
-
- /* check crypto seqnum. */
- nbr = ospf_nbr_lookup_by_routerid (oi->nbrs, &ospfh->router_id);
- - if (nbr && ntohl(nbr->crypt_seqnum) >= ntohl(ospfh->u.crypt.crypt_seqnum))
- + if (nbr && ntohl(nbr->crypt_seqnum) > ntohl(ospfh->u.crypt.crypt_seqnum))
- return 0;
-
- /* Generate a digest for the ospf packet - their digest + our digest. */
|