Date: Sat, 6 Oct 2007 17:05:10 GMT From: Fredrik Lindberg <fli@FreeBSD.org> To: Perforce Change Reviews <perforce@FreeBSD.org> Subject: PERFORCE change 127250 for review Message-ID: <200710061705.l96H5A6c006991@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=127250 Change 127250 by fli@fli_nexus on 2007/10/06 17:04:48 Ehm..a sockaddr_in6 is larger than a sockaddr, fix. Affected files ... .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/output.c#3 edit .. //depot/projects/soc2007/fli-mdns_sd/mdnsd/output.h#3 edit Differences ... ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/output.c#3 (text+ko) ==== @@ -131,7 +131,7 @@ } if (peer != NULL) { - memcpy(&oqe->oqe_peer, peer, peerlen); + memcpy(&oqe->oqe_peer.sa, peer, peerlen); oqe->oqe_peerlen = peerlen; } else @@ -203,7 +203,7 @@ oqe->oqe_fam); else mdns_send_unicast(&mif->mif_stack, &oqe->oqe_pc, - &oqe->oqe_peer, oqe->oqe_peerlen); + &oqe->oqe_peer.sa, oqe->oqe_peerlen); mdns_pkgchain_free(&oqe->oqe_pc); obj_free(OBJ_OQE, oqe); ==== //depot/projects/soc2007/fli-mdns_sd/mdnsd/output.h#3 (text+ko) ==== @@ -39,8 +39,14 @@ MAGIC(oqe_magic); TAILQ_ENTRY(oq_entry) oqe_next; int oqe_fam; - struct sockaddr oqe_peer; socklen_t oqe_peerlen; + union { + struct sockaddr sa; + struct sockaddr_in in; +#ifdef INET6 + struct sockaddr_in6 in6; +#endif + } oqe_peer; struct mdns_pkgchain oqe_pc; };
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200710061705.l96H5A6c006991>