troglobit / mdnsd

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

Fix bug in comparing A and AAA records in _a_match #73

Closed fzs closed 1 year ago

fzs commented 1 year ago

The _a_match function returns always true for A and AAAA records, because the if conditional uses a || instead of a &&, probably due to a copy-and-paste error. This patch rewrites the function to return a bool, and to use a switch-case statement to properly separate the type check from the actual comparison.

This fixes #71