aboutgitcodebugslistschat
path: root/tap.c
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2022-03-15 17:57:55 +0100
committerStefano Brivio <sbrivio@redhat.com>2022-03-28 17:11:40 +0200
commit5ca555cf7808eac4d73ad7423d40484692f1fb81 (patch)
tree00f8957f6536925f84bf034f950cbf697a451fd3 /tap.c
parent5eb7604203c733ffd803636c9f8a1a25cec7851d (diff)
downloadpasst-5ca555cf7808eac4d73ad7423d40484692f1fb81.tar
passt-5ca555cf7808eac4d73ad7423d40484692f1fb81.tar.gz
passt-5ca555cf7808eac4d73ad7423d40484692f1fb81.tar.bz2
passt-5ca555cf7808eac4d73ad7423d40484692f1fb81.tar.lz
passt-5ca555cf7808eac4d73ad7423d40484692f1fb81.tar.xz
passt-5ca555cf7808eac4d73ad7423d40484692f1fb81.tar.zst
passt-5ca555cf7808eac4d73ad7423d40484692f1fb81.zip
dhcpv6, tap, tcp: Use IN6_ARE_ADDR_EQUAL instead of open-coded memcmp()
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'tap.c')
-rw-r--r--tap.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/tap.c b/tap.c
index e1854fb..a1ccfc1 100644
--- a/tap.c
+++ b/tap.c
@@ -542,8 +542,8 @@ resume:
#define L4_MATCH(ip6h, proto, uh, seq) \
(seq->protocol == proto && \
seq->source == uh->source && seq->dest == uh->dest && \
- !memcmp(&seq->saddr, &ip6h->saddr, sizeof(seq->saddr)) && \
- !memcmp(&seq->daddr, &ip6h->daddr, sizeof(seq->daddr)))
+ IN6_ARE_ADDR_EQUAL(&seq->saddr, &ip6h->saddr) && \
+ IN6_ARE_ADDR_EQUAL(&seq->daddr, &ip6h->daddr))
#define L4_SET(ip6h, proto, uh, seq) \
do { \