Draft: Bug 0.4.5.5-rc ORPort relay (using both IPv4 & IPv6)
1 unresolved thread
1 unresolved thread
For #40289 (closed)
Edited by David Goulet
Merge request reports
Activity
changed milestone to %Tor: 0.4.5.x-stable
mentioned in issue #40289 (closed)
188 188 return buf; 189 189 } 190 190 191 /** Return true iff port p1 is equal to p2. This does a memory compare so any 192 * object pointer in the port_cfg_t will result in a false result. */ 193 static bool 194 port_cfg_eq(const port_cfg_t *p1, const port_cfg_t *p2) 195 { 196 return tor_memeq(p1, p2, sizeof(port_cfg_t)); If you do keep this implementation, it MUST NOT use
sizeof(port_cfg_t)
. It has to useoffsetof(port_cfg_t, unix_addr)
instead, becauseFLEXIBLE_ARRAY_MEMBER
is an ugly hack that can sometimes be 1 on obsolete compilers. If it is, then we can wind up allocating port_cfg_t objects that are smaller than sizeof(port_cfg_t).changed this line in version 2 of the diff
Fixup: 344b6b49
added Needs Revision label
added 1 commit
- 344b6b49 - fixup! config: Do not compare for duplicate ORPorts with different addresses
marked this merge request as draft from dgoulet/tor@344b6b49
removed Needs Revision label
added 1 commit
- fbb1f02f - fixup! fixup! config: Do not compare for duplicate ORPorts with different addresses
Please register or sign in to reply