ipv6_compare() accepts non-lvalue arguments as well. This makes filters
compile with IPv6.
This commit is contained in:
parent
67ece6df42
commit
12a9d139ee
2 changed files with 5 additions and 3 deletions
|
@ -112,9 +112,11 @@ ipv6_ntoh(ip_addr *a)
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
int
|
||||||
ipv6_compare(ip_addr *x, ip_addr *y)
|
ipv6_compare(ip_addr X, ip_addr Y)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
ip_addr *x = &X;
|
||||||
|
ip_addr *y = &Y;
|
||||||
|
|
||||||
for(i=0; i<4; i++)
|
for(i=0; i<4; i++)
|
||||||
if (x->addr[i] > y->addr[i])
|
if (x->addr[i] > y->addr[i])
|
||||||
|
|
|
@ -54,14 +54,14 @@ typedef struct ipv6_addr {
|
||||||
/* ipa_opposite and ipa_class_mask don't make sense with IPv6 */
|
/* ipa_opposite and ipa_class_mask don't make sense with IPv6 */
|
||||||
/* ipa_from_u32 and ipa_to_u32 replaced by ipa_build */
|
/* ipa_from_u32 and ipa_to_u32 replaced by ipa_build */
|
||||||
#define ipa_build(a,b,c,d) _MI(a,b,c,d)
|
#define ipa_build(a,b,c,d) _MI(a,b,c,d)
|
||||||
#define ipa_compare(x,y) ipv6_compare(&x,&y)
|
#define ipa_compare(x,y) ipv6_compare(x,y)
|
||||||
|
|
||||||
ip_addr ipv6_mkmask(unsigned);
|
ip_addr ipv6_mkmask(unsigned);
|
||||||
unsigned ipv6_mklen(ip_addr *);
|
unsigned ipv6_mklen(ip_addr *);
|
||||||
int ipv6_classify(ip_addr *);
|
int ipv6_classify(ip_addr *);
|
||||||
void ipv6_hton(ip_addr *);
|
void ipv6_hton(ip_addr *);
|
||||||
void ipv6_ntoh(ip_addr *);
|
void ipv6_ntoh(ip_addr *);
|
||||||
int ipv6_compare(ip_addr *, ip_addr *);
|
int ipv6_compare(ip_addr, ip_addr);
|
||||||
int ipv4_pton_u32(char *, u32 *);
|
int ipv4_pton_u32(char *, u32 *);
|
||||||
|
|
||||||
/* FIXME: Is this hash function uniformly distributed over standard routing tables? */
|
/* FIXME: Is this hash function uniformly distributed over standard routing tables? */
|
||||||
|
|
Loading…
Reference in a new issue