1/* $FreeBSD: head/sys/net/if_gif.c 219206 2011-03-02 21:39:08Z bz $ */ |
2/* $KAME: if_gif.c,v 1.87 2001/10/19 08:50:27 itojun Exp $ */ 3 4/*- 5 * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions --- 20 unchanged lines hidden (view full) --- 30 * SUCH DAMAGE. 31 */ 32 33#include "opt_inet.h" 34#include "opt_inet6.h" 35 36#include <sys/param.h> 37#include <sys/systm.h> |
38#include <sys/jail.h> |
39#include <sys/kernel.h> 40#include <sys/malloc.h> 41#include <sys/mbuf.h> 42#include <sys/module.h> 43#include <sys/socket.h> 44#include <sys/sockio.h> 45#include <sys/errno.h> 46#include <sys/time.h> --- 766 unchanged lines hidden (view full) --- 813 break; 814#endif /* INET6 */ 815 default: 816 error = EADDRNOTAVAIL; 817 goto bad; 818 } 819 if (src->sa_len > size) 820 return EINVAL; |
821 error = prison_if(curthread->td_ucred, src); 822 if (error != 0) 823 return (error); 824 error = prison_if(curthread->td_ucred, dst); 825 if (error != 0) 826 return (error); |
827 bcopy((caddr_t)src, (caddr_t)dst, src->sa_len); 828#ifdef INET6 829 if (dst->sa_family == AF_INET6) { 830 error = sa6_recoverscope((struct sockaddr_in6 *)dst); 831 if (error != 0) 832 return (error); 833 } 834#endif --- 196 unchanged lines hidden --- |