Source-Changes-HG archive

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

[src/trunk]: src/sys/net call PFIL_IFADDR hooks where appropriate.



details:   https://anonhg.NetBSD.org/src/rev/47e5420da848
branches:  trunk
changeset: 570040:47e5420da848
user:      yamt <yamt%NetBSD.org@localhost>
date:      Sat Sep 18 16:04:41 2004 +0000

description:
call PFIL_IFADDR hooks where appropriate.

diffstat:

 sys/net/if_spppsubr.c |  19 +++++++++++++++++--
 1 files changed, 17 insertions(+), 2 deletions(-)

diffs (59 lines):

diff -r 7de9efa44c02 -r 47e5420da848 sys/net/if_spppsubr.c
--- a/sys/net/if_spppsubr.c     Sat Sep 18 16:01:03 2004 +0000
+++ b/sys/net/if_spppsubr.c     Sat Sep 18 16:04:41 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_spppsubr.c,v 1.77 2004/04/21 17:45:38 itojun Exp $   */
+/*     $NetBSD: if_spppsubr.c,v 1.78 2004/09/18 16:04:41 yamt Exp $     */
 
 /*
  * Synchronous PPP/Cisco link level subroutines.
@@ -41,12 +41,13 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.77 2004/04/21 17:45:38 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.78 2004/09/18 16:04:41 yamt Exp $");
 
 #include "opt_inet.h"
 #include "opt_ipx.h"
 #include "opt_iso.h"
 #include "opt_ns.h"
+#include "opt_pfil_hooks.h"
 
 #include <sys/param.h>
 #include <sys/proc.h>
@@ -4802,6 +4803,11 @@
                        log(LOG_DEBUG, "%s: sppp_set_ip_addrs: in_ifinit "
                        " failed, error=%d\n", ifp->if_xname, error);
                }
+#ifdef PFIL_HOOKS
+               if (!error)
+                       (void)pfil_run_hooks(&if_pfil,
+                           (struct mbuf **)SIOCAIFADDR, ifp, PFIL_IFADDR);
+#endif
        }
 }                      
 
@@ -4846,6 +4852,10 @@
                        /* replace peer addr in place */
                        dest->sin_addr.s_addr = sp->ipcp.saved_hisaddr;
                in_ifinit(ifp, ifatoia(ifa), &new_sin, 0);
+#ifdef PFIL_HOOKS
+               (void)pfil_run_hooks(&if_pfil,
+                   (struct mbuf **)SIOCDIFADDR, ifp, PFIL_IFADDR);
+#endif
        }
 }                      
 
@@ -4945,6 +4955,11 @@
                        log(LOG_DEBUG, "%s: sppp_set_ip6_addr: in6_ifinit "
                        " failed, error=%d\n", ifp->if_xname, error);
                }
+#ifdef PFIL_HOOKS
+               if (!error)
+                       (void)pfil_run_hooks(&if_pfil,
+                           (struct mbuf **)SIOCAIFADDR_IN6, ifp, PFIL_IFADDR);
+#endif
        }
 }
 #endif



Home | Main Index | Thread Index | Old Index