1/* $FreeBSD: head/sys/net/if_gif.c 215701 2010-11-22 19:32:54Z dim $ */
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/kernel.h>
39#include <sys/malloc.h>
40#include <sys/mbuf.h>
41#include <sys/module.h>
42#include <sys/socket.h>
43#include <sys/sockio.h>
44#include <sys/errno.h>
45#include <sys/time.h>
--- 766 unchanged lines hidden (view full) ---
812 break;
813#endif /* INET6 */
814 default:
815 error = EADDRNOTAVAIL;
816 goto bad;
817 }
818 if (src->sa_len > size)
819 return EINVAL;
820 bcopy((caddr_t)src, (caddr_t)dst, src->sa_len);
821#ifdef INET6
822 if (dst->sa_family == AF_INET6) {
823 error = sa6_recoverscope((struct sockaddr_in6 *)dst);
824 if (error != 0)
825 return (error);
826 }
827#endif
--- 196 unchanged lines hidden ---
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/kernel.h>
39#include <sys/malloc.h>
40#include <sys/mbuf.h>
41#include <sys/module.h>
42#include <sys/socket.h>
43#include <sys/sockio.h>
44#include <sys/errno.h>
45#include <sys/time.h>
--- 766 unchanged lines hidden (view full) ---
812 break;
813#endif /* INET6 */
814 default:
815 error = EADDRNOTAVAIL;
816 goto bad;
817 }
818 if (src->sa_len > size)
819 return EINVAL;
820 bcopy((caddr_t)src, (caddr_t)dst, src->sa_len);
821#ifdef INET6
822 if (dst->sa_family == AF_INET6) {
823 error = sa6_recoverscope((struct sockaddr_in6 *)dst);
824 if (error != 0)
825 return (error);
826 }
827#endif
--- 196 unchanged lines hidden ---