aboutgitcodebugslistschat
path: root/util.h
diff options
context:
space:
mode:
authorStefano Brivio <sbrivio@redhat.com>2024-04-11 23:23:04 +0200
committerStefano Brivio <sbrivio@redhat.com>2024-04-19 11:21:00 +0200
commit27f1c762b15adc175b091f1244f8f1fb75781a2e (patch)
treee82df06464d9f6a3a205b613c1628f7b008d8e6f /util.h
parenteca8baa028678c6f9d703c9fde7bdf45ef01bc06 (diff)
downloadpasst-27f1c762b15adc175b091f1244f8f1fb75781a2e.tar
passt-27f1c762b15adc175b091f1244f8f1fb75781a2e.tar.gz
passt-27f1c762b15adc175b091f1244f8f1fb75781a2e.tar.bz2
passt-27f1c762b15adc175b091f1244f8f1fb75781a2e.tar.lz
passt-27f1c762b15adc175b091f1244f8f1fb75781a2e.tar.xz
passt-27f1c762b15adc175b091f1244f8f1fb75781a2e.tar.zst
passt-27f1c762b15adc175b091f1244f8f1fb75781a2e.zip
conf: Don't fail if the template interface doesn't have a MAC address
...simply resort to using locally-administered address (LAA) as host-side source, instead. Pick 02:00:00:00:00:00, to make it clear that we don't actually care about that address, and also to match the 00 (Administratively Assigned Identifier) quadrant of SLAP (RFC 8948). Otherwise, pasta refuses to start if the template is a tun or Wireguard interface. Link: https://bugs.passt.top/show_bug.cgi?id=49 Link: https://github.com/containers/podman/issues/22320 Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'util.h')
-rw-r--r--util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/util.h b/util.h
index 8c37729..ef01001 100644
--- a/util.h
+++ b/util.h
@@ -91,6 +91,7 @@
#define PORT_IS_EPHEMERAL(port) ((port) >= PORT_EPHEMERAL_MIN)
#define MAC_ZERO ((uint8_t [ETH_ALEN]){ 0 })
+#define MAC_LAA ((uint8_t [ETH_ALEN]){ BIT(1), 0, 0, 0, 0, 0 })
#define MAC_IS_ZERO(addr) (!memcmp((addr), MAC_ZERO, ETH_ALEN))
#ifndef __bswap_constant_16