Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/net we need to set rt_ifp even if ifa is the same. Fixes...



details:   https://anonhg.NetBSD.org/src/rev/74c8dd163302
branches:  trunk
changeset: 755917:74c8dd163302
user:      kefren <kefren%NetBSD.org@localhost>
date:      Mon Jun 28 17:26:11 2010 +0000

description:
we need to set rt_ifp even if ifa is the same. Fixes the case when one
changes route to a different ifp but wants to keep the same ifa

diffstat:

 sys/net/rtsock.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 3e15dea824f7 -r 74c8dd163302 sys/net/rtsock.c
--- a/sys/net/rtsock.c  Mon Jun 28 12:14:08 2010 +0000
+++ b/sys/net/rtsock.c  Mon Jun 28 17:26:11 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtsock.c,v 1.129 2010/06/26 14:24:28 kefren Exp $      */
+/*     $NetBSD: rtsock.c,v 1.130 2010/06/28 17:26:11 kefren Exp $      */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.129 2010/06/26 14:24:28 kefren Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtsock.c,v 1.130 2010/06/28 17:26:11 kefren Exp $");
 
 #include "opt_inet.h"
 #include "opt_mpls.h"
@@ -444,6 +444,8 @@
                                        rt->rt_ifp = ifp;
                                }
                        }
+                       if (ifp && rt->rt_ifp != ifp)
+                               rt->rt_ifp = ifp;
                        rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx,
                            &rt->rt_rmx);
                        if (rt->rt_ifa && rt->rt_ifa->ifa_rtrequest)



Home | Main Index | Thread Index | Old Index