pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/netbsd-tap Sync with main tree:



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ecac1d974168
branches:  trunk
changeset: 495461:ecac1d974168
user:      cube <cube%pkgsrc.org@localhost>
date:      Fri Jun 10 15:06:33 2005 +0000

description:
Sync with main tree:

 - 1.8 (christos)
    Yes, it was a cool trick >20 years ago to use "0123456789abcdef"[a] to
    implement, xtoa(), but I think defining the samestring 50 times is a bit
    too much. Defined HEXDIGITS and hexdigits in subr_prf.c and use it...

 - 1.9 (bouyer)
    call (ifp->if_input) at splnet(). ifp->if_input points to ether_input()
    which doesn't raise the IPL itself in all cases.
    Should also fix PR 29546 (the pkgsrc kernel module needs to be updated).

Bump version to 20050610.

diffstat:

 net/netbsd-tap/Makefile            |   4 ++--
 net/netbsd-tap/files/if_tap.c      |  12 +++++++-----
 net/netbsd-tap/files/if_tap_stub.c |  16 ++++++++++++++--
 net/netbsd-tap/files/if_tap_stub.h |  12 ++++++++++++
 4 files changed, 35 insertions(+), 9 deletions(-)

diffs (132 lines):

diff -r b2783edc1bc3 -r ecac1d974168 net/netbsd-tap/Makefile
--- a/net/netbsd-tap/Makefile   Fri Jun 10 13:09:07 2005 +0000
+++ b/net/netbsd-tap/Makefile   Fri Jun 10 15:06:33 2005 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2005/03/24 22:39:07 cube Exp $
+# $NetBSD: Makefile,v 1.5 2005/06/10 15:06:33 cube Exp $
 
 # This package relies on a correct configuration of pkgsrc WRT NetBSD
 # source directory information, otherwise the build will fail in a non-
@@ -22,7 +22,7 @@
 # aware that it can lead to some confusion of pkgsrc, which is why
 # MAKECONF was set to /dev/null in the first place.
 
-DISTNAME=      netbsd-tap-20050324
+DISTNAME=      netbsd-tap-20050610
 CATEGORIES=    net
 MASTER_SITES=  # empty
 DISTFILES=     # empty
diff -r b2783edc1bc3 -r ecac1d974168 net/netbsd-tap/files/if_tap.c
--- a/net/netbsd-tap/files/if_tap.c     Fri Jun 10 13:09:07 2005 +0000
+++ b/net/netbsd-tap/files/if_tap.c     Fri Jun 10 15:06:33 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_tap.c,v 1.5 2005/03/24 22:39:07 cube Exp $  */
+/*     $NetBSD: if_tap.c,v 1.6 2005/06/10 15:06:33 cube Exp $  */
 
 /*
  *  Copyright (c) 2003, 2004 The NetBSD Foundation.
@@ -43,7 +43,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.5 2005/03/24 22:39:07 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap.c,v 1.6 2005/06/10 15:06:33 cube Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "bpfilter.h"
@@ -940,6 +940,7 @@
        struct ifnet *ifp;
        struct mbuf *m, **mp;
        int error = 0;
+       int s;
 
        if (sc == NULL)
                return (ENXIO);
@@ -980,7 +981,9 @@
        if (ifp->if_bpf)
                bpf_mtap(ifp->if_bpf, m);
 #endif
+       s =splnet();
        (*ifp->if_input)(ifp, m);
+       splx(s);
 
        return (0);
 }
@@ -1380,7 +1383,6 @@
  *      @(#)if_ethersubr.c      8.2 (Berkeley) 4/4/96
  */
 
-static char digits[] = "0123456789abcdef";
 static char *
 tap_ether_sprintf(char *dest, const u_char *ap)
 {
@@ -1388,8 +1390,8 @@
        int i;
 
        for (i = 0; i < 6; i++) {
-               *cp++ = digits[*ap >> 4];
-               *cp++ = digits[*ap++ & 0xf];
+               *cp++ = tap_hexdigits[*ap >> 4];
+               *cp++ = tap_hexdigits[*ap++ & 0xf];
                *cp++ = ':';
        }
        *--cp = 0;
diff -r b2783edc1bc3 -r ecac1d974168 net/netbsd-tap/files/if_tap_stub.c
--- a/net/netbsd-tap/files/if_tap_stub.c        Fri Jun 10 13:09:07 2005 +0000
+++ b/net/netbsd-tap/files/if_tap_stub.c        Fri Jun 10 15:06:33 2005 +0000
@@ -1,7 +1,7 @@
-/*     $NetBSD: if_tap_stub.c,v 1.2 2005/02/15 21:23:08 cube Exp $     */
+/*     $NetBSD: if_tap_stub.c,v 1.3 2005/06/10 15:06:33 cube Exp $     */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_tap_stub.c,v 1.2 2005/02/15 21:23:08 cube Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_tap_stub.c,v 1.3 2005/06/10 15:06:33 cube Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -12,6 +12,10 @@
 
 #include "if_tap_stub.h"
 
+/*
+ * fdclone() and friends
+ */
+
 /* 2.99.10 is gray area.  Oh, well. */
 #if __NetBSD_Version__ < 299001100
 int
@@ -47,3 +51,11 @@
        return EOPNOTSUPP;
 }
 #endif
+
+/*
+ * hexdigits
+ */
+
+#if __NetBSD_Version__ < 399000400
+const char tap_hexdigits[] = "0123456789abcdef";
+#endif
diff -r b2783edc1bc3 -r ecac1d974168 net/netbsd-tap/files/if_tap_stub.h
--- a/net/netbsd-tap/files/if_tap_stub.h        Fri Jun 10 13:09:07 2005 +0000
+++ b/net/netbsd-tap/files/if_tap_stub.h        Fri Jun 10 15:06:33 2005 +0000
@@ -1,3 +1,6 @@
+/*
+ * fdclone() stuff
+ */
 #if __NetBSD_Version__ < 299001100
 int    tap_fdclone(struct proc *, struct file *, int, int, struct fileops *, void *);
 int    tap_fnullop_fcntl(struct file *, u_int, void *, struct proc *);
@@ -12,3 +15,12 @@
 #define tap_fnullop_fcntl      fnullop_fcntl
 #define tap_fbadop_stat                fbadop_stat
 #endif
+
+/*
+ * hexdigits
+ */
+#if __NetBSD_Version__ < 399000400
+extern const char tap_hexdigits[];
+#else
+#define tap_hexdigits hexdigits
+#endif



Home | Main Index | Thread Index | Old Index