if_vlan.c (71999) | if_vlan.c (72084) |
---|---|
1/* 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 12 unchanged lines hidden (view full) --- 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * | 1/* 2 * Copyright 1998 Massachusetts Institute of Technology 3 * 4 * Permission to use, copy, modify, and distribute this software and 5 * its documentation for any purpose and without fee is hereby 6 * granted, provided that both the above copyright notice and this 7 * permission notice appear in all copies, that both the above 8 * copyright notice and this permission notice appear in all --- 12 unchanged lines hidden (view full) --- 21 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 22 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF 23 * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND 24 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 25 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT 26 * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27 * SUCH DAMAGE. 28 * |
29 * $FreeBSD: head/sys/net/if_vlan.c 71999 2001-02-04 13:13:25Z phk $ | 29 * $FreeBSD: head/sys/net/if_vlan.c 72084 2001-02-06 10:12:15Z phk $ |
30 */ 31 32/* 33 * if_vlan.c - pseudo-device driver for IEEE 802.1Q virtual LANs. 34 * Might be extended some day to also handle IEEE 802.1p priority 35 * tagging. This is sort of sneaky in the implementation, since 36 * we need to pretend to be enough of an Ethernet implementation 37 * to make arp work. The way we do this is by telling everyone --- 92 unchanged lines hidden (view full) --- 130 error = if_delmulti(ifp_p, (struct sockaddr *)&sdl); 131 if (error) 132 return(error); 133 SLIST_REMOVE_HEAD(&sc->vlan_mc_listhead, mc_entries); 134 free(mc, M_DEVBUF); 135 } 136 137 /* Now program new ones. */ | 30 */ 31 32/* 33 * if_vlan.c - pseudo-device driver for IEEE 802.1Q virtual LANs. 34 * Might be extended some day to also handle IEEE 802.1p priority 35 * tagging. This is sort of sneaky in the implementation, since 36 * we need to pretend to be enough of an Ethernet implementation 37 * to make arp work. The way we do this is by telling everyone --- 92 unchanged lines hidden (view full) --- 130 error = if_delmulti(ifp_p, (struct sockaddr *)&sdl); 131 if (error) 132 return(error); 133 SLIST_REMOVE_HEAD(&sc->vlan_mc_listhead, mc_entries); 134 free(mc, M_DEVBUF); 135 } 136 137 /* Now program new ones. */ |
138 LIST_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { | 138 TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { |
139 if (ifma->ifma_addr->sa_family != AF_LINK) 140 continue; 141 mc = malloc(sizeof(struct vlan_mc_entry), M_DEVBUF, M_NOWAIT); 142 bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), 143 (char *)&mc->mc_addr, ETHER_ADDR_LEN); 144 SLIST_INSERT_HEAD(&sc->vlan_mc_listhead, mc, mc_entries); 145 error = if_addmulti(ifp_p, (struct sockaddr *)&sdl, &rifma); 146 if (error) --- 404 unchanged lines hidden --- | 139 if (ifma->ifma_addr->sa_family != AF_LINK) 140 continue; 141 mc = malloc(sizeof(struct vlan_mc_entry), M_DEVBUF, M_NOWAIT); 142 bcopy(LLADDR((struct sockaddr_dl *)ifma->ifma_addr), 143 (char *)&mc->mc_addr, ETHER_ADDR_LEN); 144 SLIST_INSERT_HEAD(&sc->vlan_mc_listhead, mc, mc_entries); 145 error = if_addmulti(ifp_p, (struct sockaddr *)&sdl, &rifma); 146 if (error) --- 404 unchanged lines hidden --- |