in6.c (108269) | in6.c (109623) |
---|---|
1/* $FreeBSD: head/sys/netinet6/in6.c 108269 2002-12-25 10:21:02Z ru $ */ | 1/* $FreeBSD: head/sys/netinet6/in6.c 109623 2003-01-21 08:56:16Z alfred $ */ |
2/* $KAME: in6.c,v 1.259 2002/01/21 11:37:50 keiichi 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 --- 1661 unchanged lines hidden (view full) --- 1671 1672 /* 1673 * If ifma->ifma_protospec is null, then if_addmulti() created 1674 * a new record. Otherwise, we are done. 1675 */ 1676 if (ifma->ifma_protospec != 0) 1677 return ifma->ifma_protospec; 1678 | 2/* $KAME: in6.c,v 1.259 2002/01/21 11:37:50 keiichi 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 --- 1661 unchanged lines hidden (view full) --- 1671 1672 /* 1673 * If ifma->ifma_protospec is null, then if_addmulti() created 1674 * a new record. Otherwise, we are done. 1675 */ 1676 if (ifma->ifma_protospec != 0) 1677 return ifma->ifma_protospec; 1678 |
1679 /* XXX - if_addmulti uses M_WAITOK. Can this really be called | 1679 /* XXX - if_addmulti does not use M_NOWAIT. Can this really be called |
1680 at interrupt time? If so, need to fix if_addmulti. XXX */ 1681 in6m = (struct in6_multi *)malloc(sizeof(*in6m), M_IPMADDR, M_NOWAIT); 1682 if (in6m == NULL) { 1683 splx(s); 1684 return (NULL); 1685 } 1686 1687 bzero(in6m, sizeof *in6m); --- 754 unchanged lines hidden (view full) --- 2442/* Convert sockaddr_in into sockaddr_in6 in v4 mapped addr format. */ 2443void 2444in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam) 2445{ 2446 struct sockaddr_in *sin_p; 2447 struct sockaddr_in6 *sin6_p; 2448 2449 MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME, | 1680 at interrupt time? If so, need to fix if_addmulti. XXX */ 1681 in6m = (struct in6_multi *)malloc(sizeof(*in6m), M_IPMADDR, M_NOWAIT); 1682 if (in6m == NULL) { 1683 splx(s); 1684 return (NULL); 1685 } 1686 1687 bzero(in6m, sizeof *in6m); --- 754 unchanged lines hidden (view full) --- 2442/* Convert sockaddr_in into sockaddr_in6 in v4 mapped addr format. */ 2443void 2444in6_sin_2_v4mapsin6_in_sock(struct sockaddr **nam) 2445{ 2446 struct sockaddr_in *sin_p; 2447 struct sockaddr_in6 *sin6_p; 2448 2449 MALLOC(sin6_p, struct sockaddr_in6 *, sizeof *sin6_p, M_SONAME, |
2450 M_WAITOK); | 2450 0); |
2451 sin_p = (struct sockaddr_in *)*nam; 2452 in6_sin_2_v4mapsin6(sin_p, sin6_p); 2453 FREE(*nam, M_SONAME); 2454 *nam = (struct sockaddr *)sin6_p; 2455} | 2451 sin_p = (struct sockaddr_in *)*nam; 2452 in6_sin_2_v4mapsin6(sin_p, sin6_p); 2453 FREE(*nam, M_SONAME); 2454 *nam = (struct sockaddr *)sin6_p; 2455} |