if_gif.c (106939) | if_gif.c (109623) |
---|---|
1/* $FreeBSD: head/sys/net/if_gif.c 106939 2002-11-15 00:00:15Z sam $ */ | 1/* $FreeBSD: head/sys/net/if_gif.c 109623 2003-01-21 08:56:16Z alfred $ */ |
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 --- 122 unchanged lines hidden (view full) --- 132 133int 134gif_clone_create(ifc, unit) 135 struct if_clone *ifc; 136 int unit; 137{ 138 struct gif_softc *sc; 139 | 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 --- 122 unchanged lines hidden (view full) --- 132 133int 134gif_clone_create(ifc, unit) 135 struct if_clone *ifc; 136 int unit; 137{ 138 struct gif_softc *sc; 139 |
140 sc = malloc (sizeof(struct gif_softc), M_GIF, M_WAITOK); | 140 sc = malloc (sizeof(struct gif_softc), M_GIF, 0); |
141 bzero(sc, sizeof(struct gif_softc)); 142 143 sc->gif_if.if_softc = sc; 144 sc->gif_if.if_name = GIFNAME; 145 sc->gif_if.if_unit = unit; 146 147 gifattach0(sc); 148 --- 623 unchanged lines hidden (view full) --- 772#ifdef INET6 773 case AF_INET6: 774 (void)in6_gif_detach(sc); 775 break; 776#endif 777 } 778 779 osrc = sc->gif_psrc; | 141 bzero(sc, sizeof(struct gif_softc)); 142 143 sc->gif_if.if_softc = sc; 144 sc->gif_if.if_name = GIFNAME; 145 sc->gif_if.if_unit = unit; 146 147 gifattach0(sc); 148 --- 623 unchanged lines hidden (view full) --- 772#ifdef INET6 773 case AF_INET6: 774 (void)in6_gif_detach(sc); 775 break; 776#endif 777 } 778 779 osrc = sc->gif_psrc; |
780 sa = (struct sockaddr *)malloc(src->sa_len, M_IFADDR, M_WAITOK); | 780 sa = (struct sockaddr *)malloc(src->sa_len, M_IFADDR, 0); |
781 bcopy((caddr_t)src, (caddr_t)sa, src->sa_len); 782 sc->gif_psrc = sa; 783 784 odst = sc->gif_pdst; | 781 bcopy((caddr_t)src, (caddr_t)sa, src->sa_len); 782 sc->gif_psrc = sa; 783 784 odst = sc->gif_pdst; |
785 sa = (struct sockaddr *)malloc(dst->sa_len, M_IFADDR, M_WAITOK); | 785 sa = (struct sockaddr *)malloc(dst->sa_len, M_IFADDR, 0); |
786 bcopy((caddr_t)dst, (caddr_t)sa, dst->sa_len); 787 sc->gif_pdst = sa; 788 789 switch (sc->gif_psrc->sa_family) { 790#ifdef INET 791 case AF_INET: 792 error = in_gif_attach(sc); 793 break; --- 70 unchanged lines hidden --- | 786 bcopy((caddr_t)dst, (caddr_t)sa, dst->sa_len); 787 sc->gif_pdst = sa; 788 789 switch (sc->gif_psrc->sa_family) { 790#ifdef INET 791 case AF_INET: 792 error = in_gif_attach(sc); 793 break; --- 70 unchanged lines hidden --- |