ng_device.c (75ae257016ec8c5b326d8efc49f888ba35e9234e) | ng_device.c (5e20f43d31ed44a5b770dc4757a1517aa62fa244) |
---|---|
1/*- 2 * Copyright (c) 2002 Mark Santcroos <marks@ripe.net> 3 * Copyright (c) 2004-2005 Gleb Smirnoff <glebius@FreeBSD.org> 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 --- 452 unchanged lines hidden (view full) --- 461 DBG; 462 463 if (uio->uio_resid == 0) 464 return (0); 465 466 if (uio->uio_resid < 0 || uio->uio_resid > IP_MAXPACKET) 467 return (EIO); 468 | 1/*- 2 * Copyright (c) 2002 Mark Santcroos <marks@ripe.net> 3 * Copyright (c) 2004-2005 Gleb Smirnoff <glebius@FreeBSD.org> 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 --- 452 unchanged lines hidden (view full) --- 461 DBG; 462 463 if (uio->uio_resid == 0) 464 return (0); 465 466 if (uio->uio_resid < 0 || uio->uio_resid > IP_MAXPACKET) 467 return (EIO); 468 |
469 if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0)) == NULL) | 469 if ((m = m_uiotombuf(uio, M_DONTWAIT, 0, 0, M_PKTHDR)) == NULL) |
470 return (ENOBUFS); 471 472 NG_SEND_DATA_ONLY(error, priv->hook, m); 473 474 return (error); 475} 476 477/* --- 15 unchanged lines hidden --- | 470 return (ENOBUFS); 471 472 NG_SEND_DATA_ONLY(error, priv->hook, m); 473 474 return (error); 475} 476 477/* --- 15 unchanged lines hidden --- |