| 356 | } |
| 357 | |
| 358 | static APR_INLINE unsigned hash_addr(struct apr_sockaddr_t *sa) |
| 359 | { |
| 360 | unsigned key; |
| 361 | |
| 362 | /* The key is the last four bytes of the IP address. |
| 363 | * For IPv4, this is the entire address, as always. |
| 364 | * For IPv6, this is usually part of the MAC address. |
| 365 | */ |
| 366 | key = *(unsigned *)((char *)sa->ipaddr_ptr + sa->ipaddr_len - 4); |
| 367 | return hash_inaddr(key); |
| 368 | } |
| 369 | |
| 370 | static ipaddr_chain *new_ipaddr_chain(apr_pool_t *p, |
| 371 | server_rec *s, server_addr_rec *sar) |
no test coverage detected