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.
This commit is contained in:
cube 2005-06-10 15:06:33 +00:00
parent e2eb7e8270
commit 6aac300207
4 changed files with 35 additions and 9 deletions

View file

@ -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

View file

@ -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 @@ tap_dev_write(int unit, struct uio *uio, int flags)
struct ifnet *ifp;
struct mbuf *m, **mp;
int error = 0;
int s;
if (sc == NULL)
return (ENXIO);
@ -980,7 +981,9 @@ tap_dev_write(int unit, struct uio *uio, int flags)
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 @@ tap_ether_aton(u_char *dest, char *str)
* @(#)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 @@ tap_ether_sprintf(char *dest, const u_char *ap)
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;

View file

@ -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 @@ __KERNEL_RCSID(0, "$NetBSD: if_tap_stub.c,v 1.2 2005/02/15 21:23:08 cube Exp $")
#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 @@ tap_fbadop_stat(struct file *fp, struct stat *sb, struct proc *p)
return EOPNOTSUPP;
}
#endif
/*
* hexdigits
*/
#if __NetBSD_Version__ < 399000400
const char tap_hexdigits[] = "0123456789abcdef";
#endif

View file

@ -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 @@ int tap_fbadop_stat(struct file *, struct stat *, struct proc *);
#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