diff -u version.
/Tony
Index: rde.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
retrieving revision 1.228
diff -u -r1.228 rde.c
--- rde.c 16 Sep 2007 15:20:50 -0000 1.228
+++ rde.c 6 Nov 2007 10:38:23 -0000
@@ -919,12 +919,6 @@
/* shift to NLRI information */
p += 2 + attrpath_len;
- /* aspath needs to be loop free nota bene this is not a hard error */
- if (peer->conf.ebgp && !aspath_loopfree(asp->aspath, conf->as)) {
- error = 0;
- goto done;
- }
-
/* parse nlri prefix */
while (nlri_len > 0) {
if ((pos = rde_update_get_prefix(p, nlri_len, &prefix,
@@ -954,9 +948,17 @@
peer->prefix_rcvd_update++;
/* add original path to the Adj-RIB-In */
- if (peer->conf.softreconfig_in)
- path_update(peer, asp, &prefix, prefixlen, F_ORIGINAL);
-
+ if (peer->conf.softreconfig_in) {
+ /* handle an update with loop as a withdraw */
+ if (peer->conf.ebgp && !aspath_loopfree(asp->aspath,
+ conf->as))
+ prefix_remove(peer, &prefix, prefixlen,
+ F_ORIGINAL);
+ else
+ path_update(peer, asp, &prefix, prefixlen,
+ F_ORIGINAL);
+
+ }
/* input filter */
if (rde_filter(&fasp, rules_l, peer, asp, &prefix, prefixlen,
peer, DIR_IN) == ACTION_DENY) {
@@ -977,10 +979,18 @@
if (fasp == NULL)
fasp = asp;
- rde_update_log("update", peer, &fasp->nexthop->exit_nexthop,
- &prefix, prefixlen);
- path_update(peer, fasp, &prefix, prefixlen, F_LOCAL);
-
+ rde_update_log("update", peer,
+ &fasp->nexthop->exit_nexthop,&prefix,
+ prefixlen);
+ /* handle an update with loop as a withdraw */
+ if (peer->conf.ebgp && !aspath_loopfree(asp->aspath,
+ conf->as))
+ prefix_remove(peer, &prefix, prefixlen,
+ F_LOCAL);
+ else
+ path_update(peer, fasp, &prefix, prefixlen,
+ F_LOCAL);
+
/* free modified aspath */
if (fasp != asp)
path_put(fasp);
@@ -1047,10 +1057,16 @@
peer->prefix_rcvd_update++;
/* add original path to the Adj-RIB-In */
- if (peer->conf.softreconfig_in)
- path_update(peer, asp, &prefix,
- prefixlen, F_ORIGINAL);
-
+ if (peer->conf.softreconfig_in) {
+ /* handle an update with loop as a withdraw */
+ if (peer->conf.ebgp &&
+ !aspath_loopfree(asp->aspath,conf->as))
+ prefix_remove(peer, &prefix,
+ prefixlen,F_ORIGINAL);
+ else
+ path_update(peer, asp, &prefix,
+ prefixlen, F_ORIGINAL);
+ }
/* input filter */
if (rde_filter(&fasp, rules_l, peer, asp,
&prefix, prefixlen, peer, DIR_IN) ==
@@ -1075,9 +1091,15 @@
rde_update_log("update", peer,
&asp->nexthop->exit_nexthop,
- &prefix, prefixlen);
- path_update(peer, fasp, &prefix, prefixlen,
- F_LOCAL);
+ &prefix, prefixlen);
+ /* handle an update with loop as a withdraw */
+ if (peer->conf.ebgp &&
+ !aspath_loopfree(asp->aspath,conf->as))
+ prefix_remove(peer, &prefix,
+ prefixlen,F_LOCAL);
+ else
+ path_update(peer, fasp, &prefix,
+ prefixlen,F_LOCAL);
/* free modified aspath */
if (fasp != asp)
| FUJITA Tomonori | Re: Integration of SCST in the mainstream Linux kernel |
| Arnd Bergmann | Re: [RFC][PATCH 1/4] checkpoint-restart: general infrastructure |
| Matthew Wilcox | Multiple MSI, take 3 |
| Alok Kataria | Use CPUID to communicate with the hypervisor. |
git: | |
| Li Frank-B20596 | why not TortoiseGit |
| Miklos Vajna | [rfc] git submodules howto |
| Linus Torvalds | Re: fatal: Out of memory, malloc failed |
| lukass | [RFC] Convert builin-mailinfo.c to use The Better String Library. |
| Evgeniy Polyakov | [resend take 2 0/4] Distributed storage. |
| Wenji Wu | A Linux TCP SACK Question |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| David Miller | Re: [GIT PULL] [IPV6] COMPAT: Fix SSM applications on 64bit kernels. |
| Chris | Prolific USB-Serial Controller |
| Nick Guenther | Re: how to clear dmesg outpout |
| Daniel Ouellet | identifying sparse files and get ride of them trick available? |
| Julien TOUCHE | setting up ssh tunnel/vpn |
