Hi,
After some time of playing with the B.A.T.M.A.N protocol and
net-interface on OpenWRT and Debian I was thinking to use it with
the servers I use everyday (and maybe on routers/appliances I have
nanoBSD on).
So I started an effort...
(As a background) I already ported some applications to FreeBSD [and I'm
maintaining them] and
also I did work already on the Linux emulation layer of FreeBSD (FreeBSD
has a Linux syscall-emulation and Linux-KPI layers).
So my approach (as naturally I didn't expect the build of batman-adv.ko
to be successful as is),
was based on the approach that we [at FreeBSD] did to port Linux's
drm... <https://github.com/FreeBSDDesktop/kms-drm>
I ended up in adding some header-files to FreeBSD Linux-KPI (like
average.h, percpu.h, ...).
Now I'm at a state that Netlink blocks me and I'm to determine next step :-)
[Which I don't assume it being trivial with my current approach]
So I'd like to ask:
1- Is it better approach to "rewrite" batman-adv.ko [at least
Netlink-ish (let's call "Linuxism") parts] than what I'm doing now?
2- Any other efforts are being done out there?
3- is batmand deprecated [So I should mainly focus on batman-adv.ko]?
4- any other comments do you have? :D
P.S. sorry if I'm not really good at starting conversation from scratch
and out-of-nowhere :D
but I hope by continuing the collaboration we can have better (more
enriched) FreeBSD and better (as in more portable) B.A.T.M.A.N :-)
--
Best regards, MMokhi.
From: Andreas Pape <apape(a)phoenixcontact.com>
Like in the case of the patch for batadv_bla_tx to handle a race
condition when claiming a mac address for bla, a similar situation
can occur when claiming is triggered via batadv_bla_rx. This patch
solves this with a similar approach as for batadv_bla_tx.
Signed-off-by: Andreas Pape <apape(a)phoenixcontact.com>
---
net/batman-adv/bridge_loop_avoidance.c | 31 ++++++++++++++++++++-----------
net/batman-adv/translation-table.c | 26 ++++++++++++++++++++++++++
net/batman-adv/translation-table.h | 3 +++
3 files changed, 49 insertions(+), 11 deletions(-)
diff --git a/net/batman-adv/bridge_loop_avoidance.c b/net/batman-adv/bridge_loop_avoidance.c
index d07e89e..cab8980 100644
--- a/net/batman-adv/bridge_loop_avoidance.c
+++ b/net/batman-adv/bridge_loop_avoidance.c
@@ -1847,19 +1847,28 @@ bool batadv_bla_rx(struct batadv_priv *bat_priv, struct sk_buff *skb,
if (!claim) {
/* possible optimization: race for a claim */
- /* No claim exists yet, claim it for us!
+ /* Make sure this packet is not looping back
+ * from our own backbone.
*/
- batadv_dbg(BATADV_DBG_BLA, bat_priv,
- "bla_rx(): Unclaimed MAC %pM found. Claim it. Local: %s\n",
- ethhdr->h_source,
- batadv_is_my_client(bat_priv,
- ethhdr->h_source, vid) ?
- "yes" : "no");
- batadv_handle_claim(bat_priv, primary_if,
- primary_if->net_dev->dev_addr,
- ethhdr->h_source, vid);
- goto allow;
+ if (batadv_tt_local_has_timed_out(bat_priv, ethhdr->h_source,
+ vid, 100)) {
+ /* No claim exists yet, claim it for us!
+ */
+ batadv_dbg(BATADV_DBG_BLA, bat_priv,
+ "bla_rx(): Unclaimed MAC %pM found. Claim it. Local: %s\n",
+ ethhdr->h_source,
+ batadv_is_my_client(bat_priv,
+ ethhdr->h_source, vid) ?
+ "yes" : "no");
+
+ batadv_handle_claim(bat_priv, primary_if,
+ primary_if->net_dev->dev_addr,
+ ethhdr->h_source, vid);
+ goto allow;
+ } else {
+ goto handled;
+ }
}
/* if it is our own claim ... */
diff --git a/net/batman-adv/translation-table.c b/net/batman-adv/translation-table.c
index e75b493..b908195 100644
--- a/net/batman-adv/translation-table.c
+++ b/net/batman-adv/translation-table.c
@@ -4380,3 +4380,29 @@ void batadv_tt_cache_destroy(void)
kmem_cache_destroy(batadv_tt_req_cache);
kmem_cache_destroy(batadv_tt_roam_cache);
}
+
+bool batadv_tt_local_has_timed_out(struct batadv_priv *bat_priv,
+ const u8 *addr, unsigned short vid,
+ unsigned int timeout)
+{
+ struct batadv_tt_local_entry *tt_local_entry;
+ bool ret = true;
+
+ tt_local_entry = batadv_tt_local_hash_find(bat_priv, addr, vid);
+ if (!tt_local_entry)
+ goto out;
+ /* Check if the client has been logically deleted (but is kept for
+ * consistency purpose)
+ */
+ if ((tt_local_entry->common.flags & BATADV_TT_CLIENT_PENDING) ||
+ (tt_local_entry->common.flags & BATADV_TT_CLIENT_ROAM))
+ goto out;
+ /* Check that the tt_local_entry has a certain age */
+ if (!batadv_has_timed_out(tt_local_entry->last_seen, timeout))
+ ret = false;
+
+out:
+ if (tt_local_entry)
+ batadv_tt_local_entry_put(tt_local_entry);
+ return ret;
+}
diff --git a/net/batman-adv/translation-table.h b/net/batman-adv/translation-table.h
index 411d586..b05d0d8 100644
--- a/net/batman-adv/translation-table.h
+++ b/net/batman-adv/translation-table.h
@@ -65,5 +65,8 @@ bool batadv_tt_global_is_isolated(struct batadv_priv *bat_priv,
int batadv_tt_cache_init(void);
void batadv_tt_cache_destroy(void);
+bool batadv_tt_local_has_timed_out(struct batadv_priv *bat_priv,
+ const u8 *addr, unsigned short vid,
+ unsigned int timeout);
#endif /* _NET_BATMAN_ADV_TRANSLATION_TABLE_H_ */
--
1.7.0.4
Hi David,
this is our first feature pull request for batman-adv (mostly containing
code cleanup stuff), there are at least two more to come.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit 29fbff8698fc0ac1a1d74584b258e0bf18b469f9:
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net (2016-10-13 21:40:23 -0700)
are available in the git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-for-davem-20161027
for you to fetch changes up to 4c7da0f6dbcde2431d773ce03cde5e7abede54e0:
batman-adv: Avoid precedence issues in macros (2016-10-19 08:37:54 +0200)
----------------------------------------------------------------
This code cleanup patchset includes the following changes (chronological
order):
- bump version strings, by Simon Wunderlich
- README updates/clean up, by Sven Eckelmann (4 patches)
- Code clean up and restructuring by Sven Eckelmann (2 patches)
- Kerneldoc fix in forw_packet structure, by Linus Luessing
- Remove unused argument in dbg_arp, by Antonio Quartulli
- Add support to build batman-adv without wireless, by Linus Luessing
- Restructure error handling for is_ap_isolated, by Markus Elfring
- Remove unused initialization in various functions, by Sven Eckelmann
- Use better names for fragment and gateway list heads, by Sven
Eckelmann (2 patches)
- Convert to octal permissions for files, by Sven Eckelmann
- Avoid precedence issues for some macros, by Sven Eckelmann
----------------------------------------------------------------
Antonio Quartulli (1):
batman-adv: remove unsed argument from batadv_dbg_arp() function
Linus Lüssing (2):
batman-adv: fix batadv_forw_packet kerneldoc for list attribute
batman-adv: Allow selecting BATMAN V if CFG80211 is not built
Markus Elfring (1):
batman-adv: Less function calls in batadv_is_ap_isolated() after error detection
Simon Wunderlich (1):
batman-adv: Start new development cycle
Sven Eckelmann (12):
batman-adv: Add B.A.T.M.A.N. V sysfs files to README
batman-adv: Add network_coding and mcast sysfs files to README
batman-adv: Add dat, mcast, nc and neighbor debugfs files to README
batman-adv: Document new nc, mcast and tpmeter log levels
batman-adv: Remove unused function batadv_hash_delete
batman-adv: Move batadv_sum_counter to soft-interface.c
batman-adv: Remove unused batadv_icmp_user_cmd_type
batman-adv: Remove needless init of variables on stack
batman-adv: Use proper name for fragments list head
batman-adv: Use proper name for gateway list head
batman-adv: Use octal permissions instead of macros
batman-adv: Avoid precedence issues in macros
Documentation/networking/batman-adv.txt | 35 ++++++++++++----------
net/batman-adv/Kconfig | 2 +-
net/batman-adv/bat_iv_ogm.c | 6 ++--
net/batman-adv/bat_v.c | 8 ++---
net/batman-adv/bat_v_ogm.c | 4 +--
net/batman-adv/debugfs.c | 26 ++++++++--------
net/batman-adv/distributed-arp-table.c | 17 ++++-------
net/batman-adv/fragmentation.c | 18 +++++------
net/batman-adv/fragmentation.h | 2 +-
net/batman-adv/gateway_client.c | 9 +++---
net/batman-adv/hash.h | 30 -------------------
net/batman-adv/icmp_socket.c | 5 ++--
net/batman-adv/log.c | 4 +--
net/batman-adv/log.h | 12 ++++----
net/batman-adv/main.c | 2 +-
net/batman-adv/main.h | 27 ++---------------
net/batman-adv/network-coding.c | 8 ++---
net/batman-adv/originator.c | 10 +++----
net/batman-adv/packet.h | 12 +-------
net/batman-adv/send.c | 2 +-
net/batman-adv/soft-interface.c | 21 +++++++++++++
net/batman-adv/sysfs.c | 53 ++++++++++++++-------------------
net/batman-adv/translation-table.c | 25 +++++++---------
net/batman-adv/types.h | 16 +++++-----
24 files changed, 149 insertions(+), 205 deletions(-)
Hi,
I set up a wireless mesh network by setting batman-adv on three Raspberry pies.
There was no problem communicating with each other. (ping, iperf check completed)
However, I have disabled one of these batman-adv settings and rejoined the wireless mesh network.
As a result, only two raspberry pies that have set up batman-adv communicate.
is this right?
If so, how do I configure it so that non-batman-adv nodes and nodes with batman-adv enabled communicate with each other?
Best regards.
---
Kwang-Min Kim(kim25444(a)naver.com)
+821055216393
The method ndo_start_xmit() is defined as returning an 'netdev_tx_t',
which is a typedef for an enum type, but the implementation in this
driver returns an 'int'.
Fix this by returning 'netdev_tx_t' in this driver too.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck(a)gmail.com>
---
net/batman-adv/soft-interface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index edeffcb9f..e6c800b06 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -188,7 +188,7 @@ static void batadv_interface_set_rx_mode(struct net_device *dev)
{
}
-static int batadv_interface_tx(struct sk_buff *skb,
+static netdev_tx_t batadv_interface_tx(struct sk_buff *skb,
struct net_device *soft_iface)
{
struct ethhdr *ethhdr;
--
2.17.0
Using the bool type for structure member is considered inappropriate [1]
for the kernel. Its size is not well defined (but usually 1 byte but maybe
also 4 byte).
[1] https://lkml.org/lkml/2017/11/21/384
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
net/batman-adv/types.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 0174f79e..3b3fc146 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1160,13 +1160,13 @@ struct batadv_priv_dat {
*/
struct batadv_mcast_querier_state {
/** @exists: whether a querier exists in the mesh */
- bool exists;
+ unsigned char exists:1;
/**
* @shadowing: if a querier exists, whether it is potentially shadowing
* multicast listeners (i.e. querier is behind our own bridge segment)
*/
- bool shadowing;
+ unsigned char shadowing:1;
};
/**
@@ -1207,10 +1207,10 @@ struct batadv_priv_mcast {
u8 flags;
/** @enabled: whether the multicast tvlv is currently enabled */
- bool enabled;
+ unsigned char enabled:1;
/** @bridged: whether the soft interface has a bridge on top */
- bool bridged;
+ unsigned char bridged:1;
/**
* @num_want_all_unsnoopables: number of nodes wanting unsnoopable IP
@@ -1389,7 +1389,7 @@ struct batadv_tp_vars {
atomic_t dup_acks;
/** @fast_recovery: true if in Fast Recovery mode */
- bool fast_recovery;
+ unsigned char fast_recovery:1;
/** @recover: last sent seqno when entering Fast Recovery */
u32 recover;
@@ -2046,10 +2046,10 @@ struct batadv_skb_cb {
* @decoded: Marks a skb as decoded, which is checked when searching for
* coding opportunities in network-coding.c
*/
- bool decoded;
+ unsigned char decoded:1;
/** @num_bcasts: Counter for broadcast packet retransmissions */
- unsigned int num_bcasts;
+ unsigned char num_bcasts;
};
/**
--
2.17.0
Instead of disabling multicast optimizations mesh-wide once a node with
no multicast optimizations capabilities joins the mesh, do the
following:
Just insert such nodes into the WANT_ALL_IPV4/IPV6 lists. This is
sufficient to avoid multicast packet loss to such unsupportive nodes.
Signed-off-by: Linus Lüssing <linus.luessing(a)c0d3.blue>
---
net/batman-adv/multicast.c | 29 ++++++-----------------------
net/batman-adv/soft-interface.c | 1 -
net/batman-adv/types.h | 3 ---
3 files changed, 6 insertions(+), 27 deletions(-)
diff --git a/net/batman-adv/multicast.c b/net/batman-adv/multicast.c
index a35f597e..86725d79 100644
--- a/net/batman-adv/multicast.c
+++ b/net/batman-adv/multicast.c
@@ -815,9 +815,6 @@ static int batadv_mcast_forw_mode_check(struct batadv_priv *bat_priv,
if (!atomic_read(&bat_priv->multicast_mode))
return -EINVAL;
- if (atomic_read(&bat_priv->mcast.num_disabled))
- return -EINVAL;
-
switch (ntohs(ethhdr->h_proto)) {
case ETH_P_IP:
return batadv_mcast_forw_mode_check_ipv4(bat_priv, skb,
@@ -1183,33 +1180,23 @@ static void batadv_mcast_tvlv_ogm_handler(struct batadv_priv *bat_priv,
{
bool orig_mcast_enabled = !(flags & BATADV_TVLV_HANDLER_OGM_CIFNOTFND);
u8 mcast_flags = BATADV_NO_FLAGS;
- bool orig_initialized;
if (orig_mcast_enabled && tvlv_value &&
tvlv_value_len >= sizeof(mcast_flags))
mcast_flags = *(u8 *)tvlv_value;
+ if (!orig_mcast_enabled) {
+ mcast_flags |= BATADV_MCAST_WANT_ALL_IPV4;
+ mcast_flags |= BATADV_MCAST_WANT_ALL_IPV6;
+ }
+
spin_lock_bh(&orig->mcast_handler_lock);
- orig_initialized = test_bit(BATADV_ORIG_CAPA_HAS_MCAST,
- &orig->capa_initialized);
- /* If mcast support is turned on decrease the disabled mcast node
- * counter only if we had increased it for this node before. If this
- * is a completely new orig_node no need to decrease the counter.
- */
if (orig_mcast_enabled &&
!test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities)) {
- if (orig_initialized)
- atomic_dec(&bat_priv->mcast.num_disabled);
set_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities);
- /* If mcast support is being switched off or if this is an initial
- * OGM without mcast support then increase the disabled mcast
- * node counter.
- */
} else if (!orig_mcast_enabled &&
- (test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities) ||
- !orig_initialized)) {
- atomic_inc(&bat_priv->mcast.num_disabled);
+ test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities)) {
clear_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities);
}
@@ -1595,10 +1582,6 @@ void batadv_mcast_purge_orig(struct batadv_orig_node *orig)
spin_lock_bh(&orig->mcast_handler_lock);
- if (!test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capabilities) &&
- test_bit(BATADV_ORIG_CAPA_HAS_MCAST, &orig->capa_initialized))
- atomic_dec(&bat_priv->mcast.num_disabled);
-
batadv_mcast_want_unsnoop_update(bat_priv, orig, BATADV_NO_FLAGS);
batadv_mcast_want_ipv4_update(bat_priv, orig, BATADV_NO_FLAGS);
batadv_mcast_want_ipv6_update(bat_priv, orig, BATADV_NO_FLAGS);
diff --git a/net/batman-adv/soft-interface.c b/net/batman-adv/soft-interface.c
index edeffcb9..67065e35 100644
--- a/net/batman-adv/soft-interface.c
+++ b/net/batman-adv/soft-interface.c
@@ -796,7 +796,6 @@ static int batadv_softif_init_late(struct net_device *dev)
bat_priv->mcast.querier_ipv6.shadowing = false;
bat_priv->mcast.flags = BATADV_NO_FLAGS;
atomic_set(&bat_priv->multicast_mode, 1);
- atomic_set(&bat_priv->mcast.num_disabled, 0);
atomic_set(&bat_priv->mcast.num_want_all_unsnoopables, 0);
atomic_set(&bat_priv->mcast.num_want_all_ipv4, 0);
atomic_set(&bat_priv->mcast.num_want_all_ipv6, 0);
diff --git a/net/batman-adv/types.h b/net/batman-adv/types.h
index 476b052a..0174f79e 100644
--- a/net/batman-adv/types.h
+++ b/net/batman-adv/types.h
@@ -1212,9 +1212,6 @@ struct batadv_priv_mcast {
/** @bridged: whether the soft interface has a bridge on top */
bool bridged;
- /** @num_disabled: number of nodes that have no mcast tvlv */
- atomic_t num_disabled;
-
/**
* @num_want_all_unsnoopables: number of nodes wanting unsnoopable IP
* traffic
--
2.11.0
All tools which were known to the batman-adv development team are
supporting the batman-adv netlink interface since a while. Also debugfs is
not supported for batman-adv interfaces in any non-default netns. Thus
disabling CONFIG_BATMAN_ADV_DEBUGFS by default should not cause problems on
most systems. It is still possible to enable it in case it is still
required in a specific setup.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
Was already submitted as RFC in https://patchwork.open-mesh.org/patch/16498/
---
Makefile | 2 +-
README.external.rst | 2 +-
gen-compat-autoconf.sh | 2 +-
net/batman-adv/Kconfig | 4 ++--
4 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/Makefile b/Makefile
index fe97d0aa..de607ad9 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@
# read README.external for more information about the configuration
# batman-adv DebugFS entries:
-export CONFIG_BATMAN_ADV_DEBUGFS=y
+export CONFIG_BATMAN_ADV_DEBUGFS=n
# B.A.T.M.A.N. debugging:
export CONFIG_BATMAN_ADV_DEBUG=n
# B.A.T.M.A.N. bridge loop avoidance:
diff --git a/README.external.rst b/README.external.rst
index 6379b4f5..4a2e9f6a 100644
--- a/README.external.rst
+++ b/README.external.rst
@@ -43,7 +43,7 @@ option can be set to to y (enabled), n (disabled) or m (build as
module). Available options and their possible values are
(default marked with an "*")
- * ``CONFIG_BATMAN_ADV_DEBUGFS=[y*|n]`` (B.A.T.M.A.N. debugfs entries)
+ * ``CONFIG_BATMAN_ADV_DEBUGFS=[y|n*]`` (B.A.T.M.A.N. debugfs entries)
* ``CONFIG_BATMAN_ADV_DEBUG=[y|n*]`` (B.A.T.M.A.N. debugging)
* ``CONFIG_BATMAN_ADV_BLA=[y*|n]`` (B.A.T.M.A.N. bridge loop avoidance)
* ``CONFIG_BATMAN_ADV_DAT=[y*|n]`` (B.A.T.M.A.N. Distributed ARP Table)
diff --git a/gen-compat-autoconf.sh b/gen-compat-autoconf.sh
index 5a4cdefc..071b6ccf 100755
--- a/gen-compat-autoconf.sh
+++ b/gen-compat-autoconf.sh
@@ -52,7 +52,7 @@ gen_config() {
}
# write config variables
-gen_config 'CONFIG_BATMAN_ADV_DEBUGFS' ${CONFIG_BATMAN_ADV_DEBUGFS:="y"} >> "${TMP}"
+gen_config 'CONFIG_BATMAN_ADV_DEBUGFS' ${CONFIG_BATMAN_ADV_DEBUGFS:="n"} >> "${TMP}"
gen_config 'CONFIG_BATMAN_ADV_DEBUG' ${CONFIG_BATMAN_ADV_DEBUG:="n"} >> "${TMP}"
gen_config 'CONFIG_BATMAN_ADV_BLA' ${CONFIG_BATMAN_ADV_BLA:="y"} >> "${TMP}"
gen_config 'CONFIG_BATMAN_ADV_DAT' ${CONFIG_BATMAN_ADV_DAT:="y"} >> "${TMP}"
diff --git a/net/batman-adv/Kconfig b/net/batman-adv/Kconfig
index e4e2e02b..bee034a9 100644
--- a/net/batman-adv/Kconfig
+++ b/net/batman-adv/Kconfig
@@ -94,13 +94,13 @@ config BATMAN_ADV_DEBUGFS
bool "batman-adv debugfs entries"
depends on BATMAN_ADV
depends on DEBUG_FS
- default y
+ default n
help
Enable this to export routing related debug tables via debugfs.
The information for each soft-interface and used hard-interface can be
found under batman_adv/
- If unsure, say Y.
+ If unsure, say N.
config BATMAN_ADV_DEBUG
bool "B.A.T.M.A.N. debugging"
--
2.16.2
The IP translation layer is using the neighbor table of the kernel to get
the unicast link layer (mac) address for IP(v4|v6) addresses. The kernel
can not only return unicast mac addresses to such an RTM_GETNEIGH request
but also zero mac address. Such an address must be considered invalid
because the global translation table may not only contain a unique client
mac address entry for it. The translation from client mac to originator
will therefore most likely return an unexpected originator.
Dropping these kind of (bogus) results avoids confusions while using things
like batctl's ping or traceroute.
Reported-by: Andre Kasper <Andre.Kasper(a)gmx.de>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
Cc: Andre Kasper <Andre.Kasper(a)gmx.de>
See https://www.open-mesh.org/issues/353
---
functions.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/functions.c b/functions.c
index cd92b60..3c340a2 100644
--- a/functions.c
+++ b/functions.c
@@ -571,6 +571,19 @@ static struct nla_policy neigh_policy[NDA_MAX+1] = {
[NDA_PROBES] = { .type = NLA_U32 },
};
+static bool ether_addr_valid(const uint8_t *addr)
+{
+ /* no multicast address */
+ if (addr[0] & 0x01)
+ return false;
+
+ /* no zero address */
+ if ((addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]) == 0)
+ return false;
+
+ return true;
+}
+
static int resolve_mac_from_parse(struct nl_msg *msg, void *arg)
{
struct nlattr *tb[NDA_MAX + 1];
@@ -616,6 +629,9 @@ static int resolve_mac_from_parse(struct nl_msg *msg, void *arg)
mac = nla_data(tb[NDA_LLADDR]);
l3addr = nla_data(tb[NDA_DST]);
+ if (!ether_addr_valid(mac))
+ goto err;
+
if (memcmp(nl_arg->l3addr, l3addr, l3_len) == 0) {
memcpy(nl_arg->mac_result, mac, ETH_ALEN);
nl_arg->found = 1;
--
2.17.0