On 8/27/15 2:16 PM, David Ahern wrote:
@@ -124,12 +122,12 @@ static inline struct inet_peer *inet_getpeer_v6(struct inet_peer_base *base, static inline int inetpeer_addr_cmp(const struct inetpeer_addr *a, const struct inetpeer_addr *b) { - int i, n = (a->family == AF_INET ? 1 : 4); + int i, n = (a->family == AF_INET ? sizeof(a->a4) : sizeof(a->a6));
Forgot the / by sizeof(u32) (key size) in this version of the patches. v2 coming.
for (i = 0; i < n; i++) { - if (a->addr.a6[i] == b->addr.a6[i]) + if (a->key[i] == b->key[i]) continue; - if ((__force u32)a->addr.a6[i] < (__force u32)b->addr.a6[i]) + if (a->key[i] < b->key[i]) return -1; return 1; }
-- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html