I said:
> If your problem is a cached route used for forwarding, you
> ought to run something more recent than 19-Mar-2002 (which is
> when Ruslan put in the fix in sys/netinet/in_rmx.c).

I didn't look carefully enough.  This bug fix was put in
in_rmx.c rev 1.39.  It didn't get merged back to -stable
until 9-Aug (in_rmx.c rev 1.37.2.3), which is unfortunately
*after* the last release.  If you're running a released
version of FreeBSD, your choices are:

a. Wait for the next release
b. Uprgade to -stable
c. Apply the below patch to /sys/netinet/in_rmx.c and recompile.

@@ -54,6 +54,7 @@
 #include <net/route.h>
 #include <netinet/in.h>
 #include <netinet/in_var.h>
+extern struct route ipforward_rt;              /* ip forwarding cached route */
 
 extern int     in_inithead __P((void **head, int off));
 
@@ -135,6 +136,17 @@
                        RTFREE(rt2);
                }
        }
+
+       /*
+        * If the new route created successfully, and we are forwarding,
+        * and there is a cached route, free it.  Otherwise, we may end
+        * up using the wrong route.
+        */
+       if (ret != NULL && ipforwarding && ipforward_rt.ro_rt) {
+               RTFREE(ipforward_rt.ro_rt);
+               ipforward_rt.ro_rt = 0;
+       }
+
        return ret;
 }
 

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-net" in the body of the message

Reply via email to