troglobit / mdnsd

Jeremie Miller's original mdnsd
BSD 3-Clause "New" or "Revised" License
56 stars 35 forks source link

API mdns_set_ip() is broken, endian trouble #7

Closed troglobit closed 6 years ago

troglobit commented 6 years ago

The way IP addresses are handled in libmdnsd is broken. Currently the daemon has to employ ugly tactics like this (below) to avoid clobbering the address on the network. Refactor needed!

    mdnsd_set_raw(d, r, (char *)&addr, 4);
//  mdnsd_set_ip(d, r, mdnsd_get_address(d));
troglobit commented 6 years ago

This may be pushed from v0.8 to v1.0, since I've not managed to figure out how to solve this yet. Also, it's slightly related to #15 -- touches on the same pieces of code.