mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-05-13 05:44:34 +02:00
43 lines
1.3 KiB
Diff
43 lines
1.3 KiB
Diff
From 60349fdd92936cb6633f7d31b10cb77d4baa32d4 Mon Sep 17 00:00:00 2001
|
|
From: Kaarle Ritvanen <kunkku@alpinelinux.org>
|
|
Date: Tue, 28 Mar 2023 22:11:37 +0300
|
|
Subject: [PATCH 2/4] nhrpd: fix neighbor table name length
|
|
|
|
User-space neighbor discovery was not enabled for IPv6 because the table
|
|
name was not fully copied to the Netlink message.
|
|
---
|
|
nhrpd/netlink_arp.c | 4 +++-
|
|
1 file changed, 3 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/nhrpd/netlink_arp.c b/nhrpd/netlink_arp.c
|
|
index a418ecab..105e3620 100644
|
|
--- a/nhrpd/netlink_arp.c
|
|
+++ b/nhrpd/netlink_arp.c
|
|
@@ -13,6 +13,7 @@
|
|
#include <linux/netlink.h>
|
|
#include <linux/neighbour.h>
|
|
#include <linux/netfilter/nfnetlink_log.h>
|
|
+#include <string.h>
|
|
|
|
#include "thread.h"
|
|
#include "nhrpd.h"
|
|
@@ -248,6 +249,7 @@ int netlink_configure_arp(unsigned int ifindex, int pf)
|
|
struct nlmsghdr *n;
|
|
struct ndtmsg *ndtm;
|
|
struct rtattr *rta;
|
|
+ char *name = pf == AF_INET ? "arp_cache" : "ndisc_cache";
|
|
struct zbuf *zb = zbuf_alloc(512);
|
|
int r;
|
|
|
|
@@ -257,7 +259,7 @@ int netlink_configure_arp(unsigned int ifindex, int pf)
|
|
.ndtm_family = pf,
|
|
};
|
|
|
|
- znl_rta_push(zb, NDTA_NAME, pf == AF_INET ? "arp_cache" : "ndisc_cache", 10);
|
|
+ znl_rta_push(zb, NDTA_NAME, name, strlen(name));
|
|
|
|
rta = znl_rta_nested_push(zb, NDTA_PARMS);
|
|
znl_rta_push_u32(zb, NDTPA_IFINDEX, ifindex);
|
|
--
|
|
2.40.1
|
|
|