Source-Changes-HG archive

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

[src/netbsd-1-4]: src/sys/lkm/netinet/if_ipl Pull up revision 1.22 (requested...



details:   https://anonhg.NetBSD.org/src/rev/63551cb1818c
branches:  netbsd-1-4
changeset: 469947:63551cb1818c
user:      he <he%NetBSD.org@localhost>
date:      Mon Dec 20 21:07:36 1999 +0000

description:
Pull up revision 1.22 (requested by darrenr):
  Update IPF to version 3.3.5.

diffstat:

 sys/lkm/netinet/if_ipl/mln_ipl.c |  23 ++++++++++++++++++++---
 1 files changed, 20 insertions(+), 3 deletions(-)

diffs (77 lines):

diff -r dc9118f734fb -r 63551cb1818c sys/lkm/netinet/if_ipl/mln_ipl.c
--- a/sys/lkm/netinet/if_ipl/mln_ipl.c  Mon Dec 20 21:07:31 1999 +0000
+++ b/sys/lkm/netinet/if_ipl/mln_ipl.c  Mon Dec 20 21:07:36 1999 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mln_ipl.c,v 1.21 1998/11/22 14:41:29 mrg Exp $ */
+/*     $NetBSD: mln_ipl.c,v 1.21.4.1 1999/12/20 21:07:36 he Exp $      */
 
 /*
  * Copyright (C) 1993-1998 by Darren Reed.
@@ -47,8 +47,8 @@
 #include <netinet/tcpip.h>
 #include <sys/lkm.h>
 #include "ipl.h"
-#include <netinet/ip_compat.h>
-#include <netinet/ip_fil.h>
+#include "ip_compat.h"
+#include "ip_fil.h"
 
 #if !defined(__NetBSD_Version__) || __NetBSD_Version__ < 103050000
 #define vn_lock(v,f) VOP_LOCK(v)
@@ -66,8 +66,12 @@
 #if NetBSD >= 199706
 int    if_ipl_lkmentry __P((struct lkm_table *, int, int));
 #else
+#if defined(OpenBSD)
+int    if_ipl __P((struct lkm_table *, int, int));
+#else
 int    xxxinit __P((struct lkm_table *, int, int));
 #endif
+#endif
 static int     ipl_unload __P((void));
 static int     ipl_load __P((void));
 static int     ipl_remove __P((void));
@@ -100,7 +104,9 @@
        (void *)nullop,         /* write */
        iplioctl,               /* ioctl */
        (void *)nullop,         /* stop */
+#ifndef OpenBSD
        (void *)nullop,         /* reset */
+#endif
        (void *)NULL,           /* tty */
        (void *)nullop,         /* select */
        (void *)nullop,         /* mmap */
@@ -119,14 +125,21 @@
 #if NetBSD >= 199706
 int if_ipl_lkmentry(lkmtp, cmd, ver)
 #else
+#if defined(OpenBSD)
+int if_ipl(lkmtp, cmd, ver)
+#else
 int xxxinit(lkmtp, cmd, ver)
 #endif
+#endif
 struct lkm_table *lkmtp;
 int cmd, ver;
 {
        DISPATCH(lkmtp, cmd, ver, iplaction, iplaction, iplaction);
 }
 
+#ifdef OpenBSD
+int lkmexists __P((struct lkm_table *)); /* defined in /sys/kern/kern_lkm.c */
+#endif
 
 static int iplaction(lkmtp, cmd)
 struct lkm_table *lkmtp;
@@ -182,7 +195,11 @@
                if ((error = namei(&nd)))
                        return (error);
                VOP_LEASE(nd.ni_vp, curproc, curproc->p_ucred, LEASE_WRITE);
+#ifdef OpenBSD
+               VOP_LOCK(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY, curproc);
+#else
                vn_lock(nd.ni_vp, LK_EXCLUSIVE | LK_RETRY);
+#endif
                VOP_LEASE(nd.ni_dvp, curproc, curproc->p_ucred, LEASE_WRITE);
                (void) VOP_REMOVE(nd.ni_dvp, nd.ni_vp, &nd.ni_cnd);
        }



Home | Main Index | Thread Index | Old Index