[gentoo-commits] repo/gentoo:master commit in: net-misc/radvd/files/, net-misc/radvd/

2024-01-20 Thread Sam James
commit: b6783bf26fbf710fa3bbf3379c182a131f03d54f
Author: Oskari Pirhonen  gmail  com>
AuthorDate: Tue Dec 26 03:59:18 2023 +
Commit: Sam James  gentoo  org>
CommitDate: Sat Jan 20 12:22:56 2024 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b6783bf2

net-misc/radvd: small OpenRC service tweaks

Provide a `configtest` command usable with `rc-service`. Add some
descriptive strings when running `rc-service radvd describe`.

Signed-off-by: Oskari Pirhonen  gmail.com>
Closes: https://github.com/gentoo/gentoo/pull/34479
Signed-off-by: Sam James  gentoo.org>

 net-misc/radvd/files/radvd-2.19.init | 83 
 net-misc/radvd/radvd-2.19-r7.ebuild  | 76 +
 2 files changed, 159 insertions(+)

diff --git a/net-misc/radvd/files/radvd-2.19.init 
b/net-misc/radvd/files/radvd-2.19.init
new file mode 100644
index ..069801e841ab
--- /dev/null
+++ b/net-misc/radvd/files/radvd-2.19.init
@@ -0,0 +1,83 @@
+#!/sbin/openrc-run
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+CONFIGFILE=/etc/radvd.conf
+PIDFILE=/run/radvd/radvd.pid
+SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+
+description="IPv6 Router Advertisement Daemon"
+
+extra_commands="configtest"
+extra_started_commands="reload"
+description_configtest="Test the configuration and run startup tests"
+description_reload="Reload the radvd configuration file"
+
+depend() {
+   need net
+}
+
+checkconfig() {
+   if [ ! -f "${CONFIGFILE}" ]; then
+   eerror "Configuration file ${CONFIGFILE} not found"
+   return 1
+   fi
+
+   if ! /usr/sbin/radvd -c -C "${CONFIGFILE}" ; then
+   eerror "Configuration file ${CONFIGFILE} failed test"
+   return 1
+   fi
+}
+
+configtest() {
+   ebegin "Checking ${RC_SVCNAME} configuration"
+   checkconfig
+   eend $?
+}
+
+start() {
+   if [ "${FORWARD}" != "no" ]; then
+   ebegin "Enabling IPv6 forwarding"
+   sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+   eend $?
+   fi
+
+   checkconfig || return 1
+
+   checkpath -d -o radvd:radvd "${PIDFILE%/*}"
+
+   ebegin "Starting IPv6 Router Advertisement Daemon"
+   start-stop-daemon --start --exec /usr/sbin/radvd \
+   --pidfile "${PIDFILE}" \
+   -- -C "${CONFIGFILE}" -p "${PIDFILE}" -u radvd ${OPTIONS}
+   eend $?
+}
+
+stop() {
+   ebegin "Stopping IPv6 Router Advertisement Daemon"
+   start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+   eend $?
+
+   if [ "${FORWARD}" != "no" ]; then
+   ebegin "Disabling IPv6 forwarding"
+   sysctl -w "${SYSCTL_FORWARD}=0" > /dev/null
+   eend $?
+   fi
+}
+
+reload() {
+   if [ "${FORWARD}" != "no" ]; then
+   ebegin "Enabling IPv6 forwarding"
+   sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+   eend $?
+   fi
+
+   checkconfig || return 1
+
+   checkpath -d -o radvd:radvd "${PIDFILE%/*}"
+
+   ebegin "Reloading IPv6 Router Advertisement Daemon"
+   start-stop-daemon --signal HUP \
+   --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+   eend $?
+}

diff --git a/net-misc/radvd/radvd-2.19-r7.ebuild 
b/net-misc/radvd/radvd-2.19-r7.ebuild
new file mode 100644
index ..803571c1bfce
--- /dev/null
+++ b/net-misc/radvd/radvd-2.19-r7.ebuild
@@ -0,0 +1,76 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools readme.gentoo-r1 systemd toolchain-funcs
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="https://radvd.litech.org/";
+SRC_URI="https://v6web.litech.org/radvd/dist/${P}.tar.xz";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="selinux test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="
+   sys-devel/bison
+   sys-devel/flex
+   virtual/pkgconfig"
+DEPEND="test? ( dev-libs/check )"
+RDEPEND="
+   acct-group/radvd
+   acct-user/radvd
+   selinux? ( sec-policy/selinux-radvd )"
+
+PATCHES=(
+   "${FILESDIR}"/${P}-musl-include.patch
+   "${FILESDIR}"/${P}-clang16.patch
+   "${FILESDIR}"/${P}-configure-c99.patch
+)
+
+src_prepare() {
+   default
+
+   # Drop once clang16 patch is in a release
+   eautoreconf
+}
+
+src_configure() {
+   # Needs reentrant functions (yyset_in), bug #884375
+   export LEX=flex
+
+   econf --with-pidfile=/run/radvd/radvd.pid \
+   --with-systemdsystemunitdir=no \
+   $(use_with test check)
+}
+
+src_compile() {
+   emake AR="$(tc-getAR)"
+}
+
+src_install() {
+   HTML_DOCS=( INTRO.html )
+   default
+   dodoc radvd.conf.example
+
+   newinitd "${FILESDIR}"/${PN}-2.19.init ${PN}
+   newconfd "${FI

[gentoo-commits] repo/gentoo:master commit in: net-misc/radvd/files/, net-misc/radvd/

2022-11-23 Thread Sam James
commit: 6ccf1b9327a975ba069b356e3e9f1a51e39ca45d
Author: Sam James  gentoo  org>
AuthorDate: Thu Nov 24 00:52:13 2022 +
Commit: Sam James  gentoo  org>
CommitDate: Thu Nov 24 00:52:13 2022 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6ccf1b93

net-misc/radvd: fix build w/ clang 16

Closes: https://bugs.gentoo.org/880823
Signed-off-by: Sam James  gentoo.org>

 net-misc/radvd/files/radvd-2.19-clang16.patch | 62 ++
 net-misc/radvd/radvd-2.19-r5.ebuild   | 74 +++
 2 files changed, 136 insertions(+)

diff --git a/net-misc/radvd/files/radvd-2.19-clang16.patch 
b/net-misc/radvd/files/radvd-2.19-clang16.patch
new file mode 100644
index ..793126dbcc1b
--- /dev/null
+++ b/net-misc/radvd/files/radvd-2.19-clang16.patch
@@ -0,0 +1,62 @@
+https://github.com/radvd-project/radvd/commit/f4baa88bfd77710a6034e3c23b95ef5efb80f83b
+https://bugs.gentoo.org/880823
+
+From ff7ab0cf445236f30e58531175ba912614fed952 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Thu, 17 Nov 2022 22:03:25 +
+Subject: [PATCH 1/2] Makefile.am: drop -Wno-implicit-function-declaration
+
+1. Clang 16 makes -Wimplicit-function-declaration error by default
+   (and it's planned that GCC 14 will do the same) so we need to fix
+   the real problem. This is papering over it.
+
+2. It's not true that there's nothing we can do about it. Fix in a follow-up
+   commit.
+
+Bug: https://bugs.gentoo.org/880823
+Fixes: b5e6b09cf914a960ac3b1676b77d3ea9f91821c7
+Signed-off-by: Sam James 
+--- a/Makefile.am
 b/Makefile.am
+@@ -66,9 +66,6 @@ radvd_LDADD = \
+ scanner.c: gram.h
+ gram.h: gram.c
+ 
+-libradvd_parser_a_CFLAGS = \
+-  -Wno-implicit-function-declaration
+-
+ libradvd_parser_a_SOURCES = \
+   gram.h \
+   gram.y \
+
+From e0f5bcd9091a5f7abd423fce9f372c8079849a64 Mon Sep 17 00:00:00 2001
+From: Sam James 
+Date: Thu, 17 Nov 2022 22:03:25 +
+Subject: [PATCH 2/2] gram.y: Fix -Wimplicit-function-declaration
+
+Clang 16 makes -Wimplicit-function-declaration an error by default.
+
+For more information, see LWN.net [0] or LLVM's Discourse [1], the Gentoo wiki 
[2],
+or the (new) c-std-porting mailing list [3].
+
+[0] https://lwn.net/Articles/913505/
+[1] 
https://discourse.llvm.org/t/configure-script-breakage-with-the-new-werror-implicit-function-declaration/65213
+[2] https://wiki.gentoo.org/wiki/Modern_C_porting
+[3] hosted at lists.linux.dev.
+
+Bug: https://bugs.gentoo.org/880823
+Signed-off-by: Sam James 
+--- a/gram.y
 b/gram.y
+@@ -20,6 +20,10 @@
+ 
+ #define YYERROR_VERBOSE 1
+ 
++int yylex (void);
++void yyset_in (FILE * _in_str);
++int yylex_destroy (void);
++
+ #if 0 /* no longer necessary? */
+ #ifndef HAVE_IN6_ADDR_S6_ADDR
+ # ifdef __FreeBSD__
+

diff --git a/net-misc/radvd/radvd-2.19-r5.ebuild 
b/net-misc/radvd/radvd-2.19-r5.ebuild
new file mode 100644
index ..339fa3d60deb
--- /dev/null
+++ b/net-misc/radvd/radvd-2.19-r5.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools readme.gentoo-r1 systemd toolchain-funcs
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="https://v6web.litech.org/radvd/";
+SRC_URI="https://v6web.litech.org/radvd/dist/${P}.tar.xz";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~ppc64 ~riscv ~sparc ~x86"
+IUSE="selinux test"
+RESTRICT="!test? ( test )"
+
+BDEPEND="virtual/pkgconfig"
+DEPEND="
+   sys-devel/bison
+   sys-devel/flex
+   test? ( dev-libs/check )
+"
+RDEPEND="
+   acct-group/radvd
+   acct-user/radvd
+   selinux? ( sec-policy/selinux-radvd )
+"
+
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+PATCHES=(
+   "${FILESDIR}"/${P}-musl-include.patch
+   "${FILESDIR}"/${P}-clang16.patch
+)
+
+src_prepare() {
+   default
+
+   # Drop once clang16 patch is in a release
+   eautoreconf
+}
+
+src_configure() {
+   econf --with-pidfile=/run/radvd/radvd.pid \
+   --with-systemdsystemunitdir=no \
+   $(use_with test check)
+}
+
+src_compile() {
+   emake AR="$(tc-getAR)"
+}
+
+src_install() {
+   default
+
+   docinto html
+   dodoc INTRO.html
+
+   newinitd "${FILESDIR}"/${PN}-2.15.init ${PN}
+   newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+   systemd_dounit "${FILESDIR}"/${PN}.service
+
+   readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuration file ${ROOT}/etc/radvd.conf.
+See ${ROOT}/usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."



[gentoo-commits] repo/gentoo:master commit in: net-misc/radvd/files/, net-misc/radvd/

2016-12-22 Thread Matt Thode
commit: 493cad2cd714d20609f88f968c2d34554a11655e
Author: Matthew Thode  gentoo  org>
AuthorDate: Thu Dec 22 16:11:27 2016 +
Commit: Matt Thode  gentoo  org>
CommitDate: Thu Dec 22 16:11:46 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=493cad2c

net-misc/radvd: update to use /run everywhere

Package-Manager: portage-2.3.0

 net-misc/radvd/files/radvd-2.15.init | 71 
 net-misc/radvd/radvd-2.15-r1.ebuild  | 67 ++
 2 files changed, 138 insertions(+)

diff --git a/net-misc/radvd/files/radvd-2.15.init 
b/net-misc/radvd/files/radvd-2.15.init
new file mode 100644
index ..1603d5d
--- /dev/null
+++ b/net-misc/radvd/files/radvd-2.15.init
@@ -0,0 +1,71 @@
+#!/sbin/openrc-run
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+CONFIGFILE=/etc/radvd.conf
+PIDFILE=/run/radvd/radvd.pid
+SYSCTL_FORWARD=net.ipv6.conf.all.forwarding
+
+extra_started_commands="reload"
+
+depend() {
+   need net
+}
+
+checkconfig() {
+   if [ ! -f "${CONFIGFILE}" ]; then
+   eerror "Configuration file ${CONFIGFILE} not found"
+   return 1
+   fi
+
+   if ! /usr/sbin/radvd -c -C "${CONFIGFILE}" ; then
+   eerror "Configuration file ${CONFIGFILE} failed test"
+   return 1
+   fi
+
+   checkpath -d -o radvd:radvd ${PIDFILE%/*}
+}
+
+start() {
+   if [ "${FORWARD}" != "no" ]; then
+   ebegin "Enabling IPv6 forwarding"
+   sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+   eend $?
+   fi
+
+   checkconfig || return 1
+
+   ebegin "Starting IPv6 Router Advertisement Daemon"
+   start-stop-daemon --start --exec /usr/sbin/radvd \
+   --pidfile "${PIDFILE}" \
+   -- -C "${CONFIGFILE}" -p "${PIDFILE}" -u radvd ${OPTIONS}
+   eend $?
+}
+
+stop() {
+   ebegin "Stopping IPv6 Router Advertisement Daemon"
+   start-stop-daemon --stop --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+   eend $?
+
+   if [ "${FORWARD}" != "no" ]; then
+   ebegin "Disabling IPv6 forwarding"
+   sysctl -w "${SYSCTL_FORWARD}=0" > /dev/null
+   eend $?
+   fi
+}
+
+reload() {
+   if [ "${FORWARD}" != "no" ]; then
+   ebegin "Enabling IPv6 forwarding"
+   sysctl -w "${SYSCTL_FORWARD}=1" >/dev/null
+   eend $?
+   fi
+
+   checkconfig || return 1
+
+   ebegin "Reloading IPv6 Router Advertisement Daemon"
+   start-stop-daemon --signal HUP \
+   --exec /usr/sbin/radvd --pidfile "${PIDFILE}"
+   eend $?
+}

diff --git a/net-misc/radvd/radvd-2.15-r1.ebuild 
b/net-misc/radvd/radvd-2.15-r1.ebuild
new file mode 100644
index ..a19b60e
--- /dev/null
+++ b/net-misc/radvd/radvd-2.15-r1.ebuild
@@ -0,0 +1,67 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit systemd user eutils readme.gentoo-r1
+
+DESCRIPTION="Linux IPv6 Router Advertisement Daemon"
+HOMEPAGE="http://v6web.litech.org/radvd/";
+SRC_URI="http://v6web.litech.org/radvd/dist/${P}.tar.gz";
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~hppa ~ppc ~sparc ~x86 ~x86-fbsd"
+IUSE="kernel_FreeBSD selinux test"
+
+CDEPEND="dev-libs/libdaemon"
+DEPEND="${CDEPEND}
+   sys-devel/bison
+   sys-devel/flex
+   virtual/pkgconfig
+   test? ( dev-libs/check )"
+RDEPEND="${CDEPEND}
+   selinux? ( sec-policy/selinux-radvd )
+"
+DOCS=( CHANGES README TODO radvd.conf.example )
+
+pkg_setup() {
+   enewgroup radvd
+   enewuser radvd -1 -1 /dev/null radvd
+}
+
+src_configure() {
+   econf --with-pidfile=/run/radvd/radvd.pid \
+   --disable-silent-rules \
+   --with-systemdsystemunitdir=no \
+   $(use_with test check)
+}
+
+src_install() {
+   default
+
+   dohtml INTRO.html
+
+   newinitd "${FILESDIR}"/${PN}-2.15.init ${PN}
+   newconfd "${FILESDIR}"/${PN}.conf ${PN}
+
+   systemd_dounit "${FILESDIR}"/${PN}.service
+   systemd_newtmpfilesd  "${FILESDIR}"/${PN}.tmpfilesd ${PN}.conf
+
+   if use kernel_FreeBSD ; then
+   sed -i -e \
+   
's/^SYSCTL_FORWARD=.*$/SYSCTL_FORWARD=net.inet6.ip6.forwarding/g' \
+   "${D}"/etc/init.d/${PN} || die
+   fi
+
+   readme.gentoo_create_doc
+}
+
+DISABLE_AUTOFORMATTING=1
+DOC_CONTENTS="Please create a configuration file ${ROOT}etc/radvd.conf.
+See ${ROOT}usr/share/doc/${PF} for an example.
+
+grsecurity users should allow a specific group to read /proc
+and add the radvd user to that group, otherwise radvd may
+segfault on startup."



[gentoo-commits] repo/gentoo:master commit in: net-misc/radvd/files/, net-misc/radvd/

2016-09-27 Thread Michael Weber
commit: 483250f63414b3a716e664d99c120dbd1a2211b0
Author: Michael Weber  gentoo  org>
AuthorDate: Tue Sep 27 21:57:44 2016 +
Commit: Michael Weber  gentoo  org>
CommitDate: Tue Sep 27 21:58:08 2016 +
URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=483250f6

net-misc/radvd: drop old.

Package-Manager: portage-2.2.28

 net-misc/radvd/Manifest|  1 -
 .../radvd/files/radvd-2.10-musl-libc-fix.patch | 87 --
 net-misc/radvd/radvd-2.12.ebuild   | 69 -
 3 files changed, 157 deletions(-)

diff --git a/net-misc/radvd/Manifest b/net-misc/radvd/Manifest
index d1c07cd..50d3864 100644
--- a/net-misc/radvd/Manifest
+++ b/net-misc/radvd/Manifest
@@ -1,5 +1,4 @@
 DIST radvd-1.9.8.tar.gz 176288 SHA256 
645ccf1c9b16e769ff4179813712e580e2c8786d64a888d8afa1e296c057c1c1 SHA512 
25ffa2fe1289ee826432ade3846aa5008e34ff9f0cbe954bf44ebae22198de59b40b7b4a70d19c74117b3280a7ca6a4bf740536f4a08e0bf169e760748548971
 WHIRLPOOL 
228182cb6fdc6065a728f679ee6d93286c48f186b209b6ff8d553f06317d0e799687c5abf0179cda5c42d2ca72ca32bdacbc31e0a14a06d18316a6538eb09017
-DIST radvd-2.12.tar.gz 210605 SHA256 
6b81211e9027e008306ffdcb48948b0035f6e0f3bfcbf0a2a39b1b13f6b9c3fa SHA512 
1703b90f2990a1fe2113b5ae1b564ebb25b9106ac13c2268f78aaea804263ca7cc33976fe30fd52f01a91283f66114b37200747d8178c4e1985035361e6143d9
 WHIRLPOOL 
a10351d758397d527cef3e739f6783beb3090175868948b13e365dd1adee671a8cc821bbe8c3bfc6ba8e8622be886567bee68d3460d6220c0b14dffcf35f1b37
 DIST radvd-2.13.tar.gz 211392 SHA256 
bd009f13e253f546049103fdf829145bf47d4ad9341d49c3e500b1cfadd6d469 SHA512 
050fd273727acfac6f6a7eb1245d4a6ef01cbfb4654a922b98f0944931535770154dd564a09a43bc96bd1a575ecd426cee042dc1129dc453cbda03d7975d49ce
 WHIRLPOOL 
03451fb0561130c97cf509cf18ad69a508106e46ced18d351cd6274d009879006c552d4484ac2a470078f420951c60415e40852a2a43e20b90b19e2b89a94ae5
 DIST radvd-2.14.tar.gz 211461 SHA256 
46d31c05daea11c3d1e3dc092997d3631b3bc72b20a4f279b05304b83dbd7aa8 SHA512 
8fdfd776f998b82e9dcbb29a13e44b1ba060f2e4b03bae0167549fb58731f16e80e980f9636e0d7614270b8e6457779ac044b433c5c5d26d9fb72ea9e2d3cb02
 WHIRLPOOL 
6f2974c4e9d689052b36885c2b82425e346bdd7fd3a928a650f2c71debc7cd5e3c13504759fb5cec20641f4e6fdf35ce6a83fe3023f6efa00efff3da84b01954
 DIST radvd-2.15.tar.gz 214256 SHA256 
83dd770595e6182757fd652cfc46ee462b73d8d34ba0848a1d481c4d51143607 SHA512 
51ed457814f32750f915e22556c739d0a574af6318d469ae77c42fb7dfce8752edc2b70e3dd910d46c6198a5a81e4be4611dd4e379920488f4d4427cda0a7ea0
 WHIRLPOOL 
3b8d9436b6c37088f7af0de06e12ef93a05ab2b71df0617e63d6ee106b336a22dfad3df07e6c0301da5bf4d8a646a2c2ce2a50d9ca991f541c51ce35ebb2b187

diff --git a/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch 
b/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch
deleted file mode 100644
index c44f284..
--- a/net-misc/radvd/files/radvd-2.10-musl-libc-fix.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 1d8973e13d89802eee0b648451e2b97ac65cf9e0 Mon Sep 17 00:00:00 2001
-From: Reuben Hawkins 
-Date: Sat, 16 May 2015 09:27:38 -0700
-Subject: [PATCH] device-linux.c: IEEE 802.15.4 musl libc fix
-
-The ARPHRD_IEEE802154 macro's definition and name have been recently
-moved around from kernel header to glibc headers.  Include linux/if_arp.h
-if available and then use either ARPHRD_IEEE802154_MONITOR or 
ARPHRD_IEEE802154_PHY,
-whichever comes first.

- configure.ac   | 1 +
- device-linux.c | 8 
- includes.h | 6 ++
- 3 files changed, 15 insertions(+)
-
-diff --git a/configure.ac b/configure.ac
-index 0c1efd6..4bd4c9d 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -156,6 +156,7 @@ AC_HEADER_STDC
- AC_CHECK_HEADERS( \
-   getopt.h \
-   ifaddrs.h \
-+  linux/if_arp.h \
-   machine/limits.h \
-   machine/param.h \
-   net/if_arp.h \
-diff --git a/device-linux.c b/device-linux.c
-index fa7d978..de83f2e 100644
 a/device-linux.c
-+++ b/device-linux.c
-@@ -79,10 +79,12 @@ int update_device_info(int sock, struct Interface *iface)
-   iface->sllao.if_maxmtu = -1;
-   break;
- #endif/* ARPHDR_ARCNET */
-+#ifdef ARPHRD_IEEE802154
-   case ARPHRD_IEEE802154:
-   iface->sllao.if_hwaddr_len = 64;
-   iface->sllao.if_prefix_len = 64;
-   break;
-+#endif
-   default:
-   iface->sllao.if_hwaddr_len = -1;
-   iface->sllao.if_prefix_len = -1;
-@@ -371,9 +373,15 @@ static char const *hwstr(unsigned short sa_family)
-   case ARPHRD_IEEE802154:
-   rc = "ARPHRD_IEEE802154";
-   break;
-+#if ARPHRD_IEEE802154_MONITOR
-+  case ARPHRD_IEEE802154_MONITOR:
-+  rc = "ARPHRD_IEEE802154_MONITOR";
-+  break;
-+#elif ARPHRD_IEEE802154_PHY
-   case ARPHRD_IEEE802154_PHY:
-   rc = "ARPHRD_IEEE802154_PHY";
-   break;
-+#endif
-   case ARPHRD_VOID:
-   rc = "ARPHRD_VOID";
-