mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-08-23 06:35:57 +00:00
Use macros to compare IP addresses
This commit is contained in:
parent
c58dfa2156
commit
d51d6b2d89
|
@ -175,8 +175,8 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf *pb)
|
||||||
* again & we don't have to do any reordering if it's used.
|
* again & we don't have to do any reordering if it's used.
|
||||||
*/
|
*/
|
||||||
INCR(vjs_packets);
|
INCR(vjs_packets);
|
||||||
if (ip->src.addr != cs->cs_ip.src.addr
|
if (!ip_addr_cmp(&ip->src, &cs->cs_ip.src)
|
||||||
|| ip->dest.addr != cs->cs_ip.dest.addr
|
|| !ip_addr_cmp(&ip->dest, &cs->cs_ip.dest)
|
||||||
|| *(long *)th != ((long *)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
|
|| *(long *)th != ((long *)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
|
||||||
/*
|
/*
|
||||||
* Wasn't the first -- search for it.
|
* Wasn't the first -- search for it.
|
||||||
|
@ -196,8 +196,8 @@ vj_compress_tcp(struct vjcompress *comp, struct pbuf *pb)
|
||||||
do {
|
do {
|
||||||
lcs = cs; cs = cs->cs_next;
|
lcs = cs; cs = cs->cs_next;
|
||||||
INCR(vjs_searches);
|
INCR(vjs_searches);
|
||||||
if (ip->src.addr == cs->cs_ip.src.addr
|
if (ip_addr_cmp(&ip->src, &cs->cs_ip.src)
|
||||||
&& ip->dest.addr == cs->cs_ip.dest.addr
|
&& ip_addr_cmp(&ip->dest, &cs->cs_ip.dest)
|
||||||
&& *(long *)th == ((long *)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
|
&& *(long *)th == ((long *)&cs->cs_ip)[IPH_HL(&cs->cs_ip)]) {
|
||||||
goto found;
|
goto found;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user