Deleted Added
full compact
if_tap.c (144979) if_tap.c (145883)
1/*-
2 * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * BASED ON:
27 * -------------------------------------------------------------------------
28 *
29 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
30 * Nottingham University 1987.
31 */
32
33/*
1/*-
2 * Copyright (C) 1999-2000 by Maksim Yevmenkin <m_evmenkin@yahoo.com>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 17 unchanged lines hidden (view full) ---

26 * BASED ON:
27 * -------------------------------------------------------------------------
28 *
29 * Copyright (c) 1988, Julian Onions <jpo@cs.nott.ac.uk>
30 * Nottingham University 1987.
31 */
32
33/*
34 * $FreeBSD: head/sys/net/if_tap.c 144979 2005-04-13 00:30:19Z mdodd $
34 * $FreeBSD: head/sys/net/if_tap.c 145883 2005-05-04 18:55:03Z emax $
35 * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $
36 */
37
38#include "opt_inet.h"
39
40#include <sys/param.h>
41#include <sys/conf.h>
42#include <sys/fcntl.h>

--- 779 unchanged lines hidden (view full) ---

822
823 if ((uio->uio_resid < 0) || (uio->uio_resid > TAPMRU)) {
824 TAPDEBUG("%s invalid packet len = %d, minor = %#x\n",
825 ifp->if_xname, uio->uio_resid, minor(dev));
826
827 return (EIO);
828 }
829
35 * $Id: if_tap.c,v 0.21 2000/07/23 21:46:02 max Exp $
36 */
37
38#include "opt_inet.h"
39
40#include <sys/param.h>
41#include <sys/conf.h>
42#include <sys/fcntl.h>

--- 779 unchanged lines hidden (view full) ---

822
823 if ((uio->uio_resid < 0) || (uio->uio_resid > TAPMRU)) {
824 TAPDEBUG("%s invalid packet len = %d, minor = %#x\n",
825 ifp->if_xname, uio->uio_resid, minor(dev));
826
827 return (EIO);
828 }
829
830 if ((m = m_uiotombuf(uio, M_DONTWAIT, 0)) == NULL) {
830 if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, ETHER_ALIGN)) == NULL) {
831 ifp->if_ierrors ++;
832 return (error);
833 }
834
835 m->m_pkthdr.rcvif = ifp;
836
837 /* Pass packet up to parent. */
838 (*ifp->if_input)(ifp, m);

--- 48 unchanged lines hidden ---
831 ifp->if_ierrors ++;
832 return (error);
833 }
834
835 m->m_pkthdr.rcvif = ifp;
836
837 /* Pass packet up to parent. */
838 (*ifp->if_input)(ifp, m);

--- 48 unchanged lines hidden ---