in.c (265092) | in.c (269243) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (C) 2001 WIDE Project. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * @(#)in.c 8.4 (Berkeley) 1/9/95 31 */ 32 33#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1982, 1986, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * Copyright (C) 2001 WIDE Project. All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 17 unchanged lines hidden (view full) --- 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 * @(#)in.c 8.4 (Berkeley) 1/9/95 31 */ 32 33#include <sys/cdefs.h> |
34__FBSDID("$FreeBSD: head/sys/netinet/in.c 265092 2014-04-29 14:46:45Z asomers $"); | 34__FBSDID("$FreeBSD: head/sys/netinet/in.c 269243 2014-07-29 15:01:29Z glebius $"); |
35 36#include "opt_mpath.h" 37 38#include <sys/param.h> 39#include <sys/eventhandler.h> 40#include <sys/systm.h> 41#include <sys/sockio.h> 42#include <sys/malloc.h> --- 315 unchanged lines hidden (view full) --- 358 359 ifa = ifa_alloc(sizeof(struct in_ifaddr), M_WAITOK); 360 ia = (struct in_ifaddr *)ifa; 361 ifa->ifa_addr = (struct sockaddr *)&ia->ia_addr; 362 ifa->ifa_dstaddr = (struct sockaddr *)&ia->ia_dstaddr; 363 ifa->ifa_netmask = (struct sockaddr *)&ia->ia_sockmask; 364 365 ia->ia_ifp = ifp; | 35 36#include "opt_mpath.h" 37 38#include <sys/param.h> 39#include <sys/eventhandler.h> 40#include <sys/systm.h> 41#include <sys/sockio.h> 42#include <sys/malloc.h> --- 315 unchanged lines hidden (view full) --- 358 359 ifa = ifa_alloc(sizeof(struct in_ifaddr), M_WAITOK); 360 ia = (struct in_ifaddr *)ifa; 361 ifa->ifa_addr = (struct sockaddr *)&ia->ia_addr; 362 ifa->ifa_dstaddr = (struct sockaddr *)&ia->ia_dstaddr; 363 ifa->ifa_netmask = (struct sockaddr *)&ia->ia_sockmask; 364 365 ia->ia_ifp = ifp; |
366 ia->ia_ifa.ifa_metric = ifp->if_metric; | |
367 ia->ia_addr = *addr; 368 if (mask->sin_len != 0) { 369 ia->ia_sockmask = *mask; 370 ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr); 371 } else { 372 in_addr_t i = ntohl(addr->sin_addr.s_addr); 373 374 /* --- 888 unchanged lines hidden --- | 366 ia->ia_addr = *addr; 367 if (mask->sin_len != 0) { 368 ia->ia_sockmask = *mask; 369 ia->ia_subnetmask = ntohl(ia->ia_sockmask.sin_addr.s_addr); 370 } else { 371 in_addr_t i = ntohl(addr->sin_addr.s_addr); 372 373 /* --- 888 unchanged lines hidden --- |