[PATCH net 00/12] net: iflink and link-netnsid fixes
by Sabrina Dubroca
In a lot of places, we use this kind of comparison to detect if a
device has a lower link:
dev->ifindex != dev_get_iflink(dev)
This seems to be a leftover of the pre-netns days, when the ifindex
was unique over the whole system. Nowadays, with network namespaces,
it's very easy to create a device with the same ifindex as its lower
link:
ip netns add main
ip netns add peer
ip -net main link add dummy0 type dummy
ip -net main link add link dummy0 macvlan0 netns peer type macvlan
ip -net main link show type dummy
9: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop ...
ip -net peer link show type macvlan
9: macvlan0@if9: <BROADCAST,MULTICAST> mtu 1500 qdisc noop ...
To detect if a device has a lower link, we can simply check the
existence of the dev->netdev_ops->ndo_get_iflink operation, instead of
checking its return value. In particular, I attempted to fix one of
these checks in commit feadc4b6cf42 ("rtnetlink: always put IFLA_LINK
for links with a link-netnsid"), but this patch isn't correct, since
tunnel devices can export IFLA_LINK_NETNSID without IFLA_LINK. That
patch needs to be reverted.
This series will fix all those bogus comparisons, and export missing
IFLA_LINK_NETNSID attributes in bridge and ipv6 dumps.
ipvlan and geneve are also missing the get_link_net operation, so
userspace can't know when those device are cross-netns. There are a
couple of other device types that have an ndo_get_iflink op but no
get_link_net (virt_wifi, ipoib), and should probably also have a
get_link_net.
Sabrina Dubroca (12):
ipvlan: add get_link_net
geneve: add get_link_net
Revert "rtnetlink: always put IFLA_LINK for links with a link-netnsid"
rtnetlink: always put IFLA_LINK for links with ndo_get_iflink
bridge: always put IFLA_LINK for ports with ndo_get_iflink
bridge: advertise IFLA_LINK_NETNSID when dumping bridge ports
ipv6: always put IFLA_LINK for devices with ndo_get_iflink
ipv6: advertise IFLA_LINK_NETNSID when dumping ipv6 addresses
net: link_watch: fix operstate when the link has the same index as the
device
net: link_watch: fix detection of urgent events
batman-adv: fix iflink detection in batadv_is_on_batman_iface
batman-adv: fix detection of lower link in batadv_get_real_netdevice
drivers/net/can/vxcan.c | 2 +-
drivers/net/geneve.c | 8 ++++++++
drivers/net/ipvlan/ipvlan_main.c | 9 +++++++++
drivers/net/veth.c | 2 +-
include/net/rtnetlink.h | 4 ++++
net/batman-adv/hard-interface.c | 4 ++--
net/bridge/br_netlink.c | 4 +++-
net/core/link_watch.c | 4 ++--
net/core/rtnetlink.c | 25 ++++++++++++-------------
net/ipv6/addrconf.c | 11 ++++++++++-
10 files changed, 52 insertions(+), 21 deletions(-)
--
2.28.0
4 days, 12 hours
WARNING in sta_info_alloc
by syzbot
Hello,
syzbot found the following issue on:
HEAD commit: 549738f1 Linux 5.9-rc8
git tree: upstream
console output: https://syzkaller.appspot.com/x/log.txt?x=15b97ba3900000
kernel config: https://syzkaller.appspot.com/x/.config?x=c06bcf3cc963d91c
dashboard link: https://syzkaller.appspot.com/bug?extid=45d7c243c006f39dc55a
compiler: gcc (GCC) 10.1.0-syz 20200507
syz repro: https://syzkaller.appspot.com/x/repro.syz?x=12bae9c0500000
C reproducer: https://syzkaller.appspot.com/x/repro.c?x=1099b1c0500000
The issue was bisected to:
commit 643c332d519bdfbf80d21f40d1c0aa0ccf3ec1cb
Author: Zi Shen Lim <zlim.lnx(a)gmail.com>
Date: Thu Jun 9 04:18:50 2016 +0000
arm64: bpf: optimize LD_ABS, LD_IND
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=11d44477900000
final oops: https://syzkaller.appspot.com/x/report.txt?x=13d44477900000
console output: https://syzkaller.appspot.com/x/log.txt?x=15d44477900000
IMPORTANT: if you fix the issue, please add the following tag to the commit:
Reported-by: syzbot+45d7c243c006f39dc55a(a)syzkaller.appspotmail.com
Fixes: 643c332d519b ("arm64: bpf: optimize LD_ABS, LD_IND")
------------[ cut here ]------------
WARNING: CPU: 0 PID: 6879 at net/mac80211/ieee80211_i.h:1447 ieee80211_get_sband net/mac80211/ieee80211_i.h:1447 [inline]
WARNING: CPU: 0 PID: 6879 at net/mac80211/ieee80211_i.h:1447 sta_info_alloc+0x1900/0x1f90 net/mac80211/sta_info.c:469
Kernel panic - not syncing: panic_on_warn set ...
CPU: 0 PID: 6879 Comm: syz-executor071 Not tainted 5.9.0-rc8-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
Call Trace:
__dump_stack lib/dump_stack.c:77 [inline]
dump_stack+0x198/0x1fd lib/dump_stack.c:118
panic+0x382/0x7fb kernel/panic.c:231
__warn.cold+0x20/0x4b kernel/panic.c:600
report_bug+0x1bd/0x210 lib/bug.c:198
handle_bug+0x38/0x90 arch/x86/kernel/traps.c:234
exc_invalid_op+0x14/0x40 arch/x86/kernel/traps.c:254
asm_exc_invalid_op+0x12/0x20 arch/x86/include/asm/idtentry.h:536
RIP: 0010:ieee80211_get_sband net/mac80211/ieee80211_i.h:1447 [inline]
RIP: 0010:sta_info_alloc+0x1900/0x1f90 net/mac80211/sta_info.c:469
Code: 00 00 00 00 00 fc ff df 48 89 fa 48 c1 ea 03 80 3c 02 00 0f 85 f0 04 00 00 49 8b 9f 60 01 00 00 e9 fc f6 ff ff e8 80 20 b6 f9 <0f> 0b e8 e9 62 66 00 31 ff 89 c3 89 c6 e8 ce 1c b6 f9 85 db 74 1d
RSP: 0018:ffffc9000539f498 EFLAGS: 00010293
RAX: 0000000000000000 RBX: 0000000000000001 RCX: ffffffff87c01d61
RDX: ffff8880a91ec3c0 RSI: ffffffff87c01e10 RDI: 0000000000000005
RBP: ffff8880896e0c80 R08: 0000000000000001 R09: ffffffff8d0c29e7
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000000
R13: ffff8880896e31b0 R14: dffffc0000000000 R15: ffff888092f06000
ieee80211_add_station+0x28c/0x660 net/mac80211/cfg.c:1586
rdev_add_station net/wireless/rdev-ops.h:190 [inline]
nl80211_new_station+0xde7/0x1440 net/wireless/nl80211.c:6294
genl_family_rcv_msg_doit net/netlink/genetlink.c:669 [inline]
genl_family_rcv_msg net/netlink/genetlink.c:714 [inline]
genl_rcv_msg+0x61d/0x980 net/netlink/genetlink.c:731
netlink_rcv_skb+0x15a/0x430 net/netlink/af_netlink.c:2470
genl_rcv+0x24/0x40 net/netlink/genetlink.c:742
netlink_unicast_kernel net/netlink/af_netlink.c:1304 [inline]
netlink_unicast+0x533/0x7d0 net/netlink/af_netlink.c:1330
netlink_sendmsg+0x856/0xd90 net/netlink/af_netlink.c:1919
sock_sendmsg_nosec net/socket.c:651 [inline]
sock_sendmsg+0xcf/0x120 net/socket.c:671
____sys_sendmsg+0x6e8/0x810 net/socket.c:2353
___sys_sendmsg+0xf3/0x170 net/socket.c:2407
__sys_sendmsg+0xe5/0x1b0 net/socket.c:2440
do_syscall_64+0x2d/0x70 arch/x86/entry/common.c:46
entry_SYSCALL_64_after_hwframe+0x44/0xa9
RIP: 0033:0x441999
Code: e8 dc 05 03 00 48 83 c4 18 c3 0f 1f 80 00 00 00 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 0f 83 7b 0d fc ff c3 66 2e 0f 1f 84 00 00 00 00
RSP: 002b:00007ffd9fa54bf8 EFLAGS: 00000246 ORIG_RAX: 000000000000002e
RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 0000000000441999
RDX: 0000000000000000 RSI: 0000000020000040 RDI: 0000000000000005
RBP: 000000306e616c77 R08: 0000000000000000 R09: 0000002000000000
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000032
R13: 0000000000000000 R14: 000000000000000c R15: 0000000000000004
Kernel Offset: disabled
Rebooting in 86400 seconds..
---
This report is generated by a bot. It may contain errors.
See https://goo.gl/tpsmEJ for more information about syzbot.
syzbot engineers can be reached at syzkaller(a)googlegroups.com.
syzbot will keep track of this issue. See:
https://goo.gl/tpsmEJ#status for how to communicate with syzbot.
For information about bisection process see: https://goo.gl/tpsmEJ#bisection
syzbot can test patches for this issue, for details see:
https://goo.gl/tpsmEJ#testing-patches
10 months
[PATCH 1/3] alfred: Update copyright years for 2021
by Sven Eckelmann
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
Makefile | 2 +-
alfred.h | 2 +-
batadv_query.c | 2 +-
batadv_query.h | 2 +-
batadv_querynl.c | 2 +-
batadv_querynl.h | 2 +-
batman_adv.h | 2 +-
bitops.h | 2 +-
client.c | 2 +-
gpsd/Makefile | 2 +-
gpsd/alfred-gpsd.c | 2 +-
gpsd/alfred-gpsd.h | 2 +-
hash.c | 2 +-
hash.h | 2 +-
main.c | 2 +-
netlink.c | 2 +-
netlink.h | 2 +-
netsock.c | 2 +-
packet.h | 2 +-
recv.c | 2 +-
send.c | 2 +-
server.c | 2 +-
unix_sock.c | 2 +-
util.c | 2 +-
vis/Makefile | 2 +-
vis/vis.c | 2 +-
vis/vis.h | 2 +-
27 files changed, 27 insertions(+), 27 deletions(-)
diff --git a/Makefile b/Makefile
index 6268cb9..57206e0 100755
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0
# -*- makefile -*-
#
-# Copyright (C) 2012-2020 B.A.T.M.A.N. contributors
+# Copyright (C) 2012-2021 B.A.T.M.A.N. contributors
#
# License-Filename: LICENSES/preferred/GPL-2.0
diff --git a/alfred.h b/alfred.h
index a61365d..8a9d244 100644
--- a/alfred.h
+++ b/alfred.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/batadv_query.c b/batadv_query.c
index 66d3452..410d271 100644
--- a/batadv_query.c
+++ b/batadv_query.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/batadv_query.h b/batadv_query.h
index 291292d..f198de9 100644
--- a/batadv_query.h
+++ b/batadv_query.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2006-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2006-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
diff --git a/batadv_querynl.c b/batadv_querynl.c
index 2793242..d9a6028 100644
--- a/batadv_querynl.c
+++ b/batadv_querynl.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2009-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2009-2021 B.A.T.M.A.N. contributors:
*
* Marek Lindner <mareklindner(a)neomailbox.ch>, Andrew Lunn <andrew(a)lunn.ch>
*
diff --git a/batadv_querynl.h b/batadv_querynl.h
index f684ad8..7f969b9 100644
--- a/batadv_querynl.h
+++ b/batadv_querynl.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2009-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2009-2021 B.A.T.M.A.N. contributors:
*
* Marek Lindner <mareklindner(a)neomailbox.ch>, Andrew Lunn <andrew(a)lunn.ch>
*
diff --git a/batman_adv.h b/batman_adv.h
index bdb317f..27d35e7 100644
--- a/batman_adv.h
+++ b/batman_adv.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: MIT */
-/* Copyright (C) 2016-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2016-2021 B.A.T.M.A.N. contributors:
*
* Matthias Schiffer
*/
diff --git a/bitops.h b/bitops.h
index 2333aa4..802fc25 100644
--- a/bitops.h
+++ b/bitops.h
@@ -2,7 +2,7 @@
/* Minimal Linux-like bit manipulation helper functions
* (reduced version for alfred)
*
- * Copyright (c) 2012-2020, Sven Eckelmann <sven(a)narfation.org>
+ * Copyright (c) 2012-2021, Sven Eckelmann <sven(a)narfation.org>
*
* License-Filename: LICENSES/preferred/MIT
*/
diff --git a/client.c b/client.c
index b19887d..bd38c2f 100644
--- a/client.c
+++ b/client.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/gpsd/Makefile b/gpsd/Makefile
index 0645573..b02404d 100755
--- a/gpsd/Makefile
+++ b/gpsd/Makefile
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0
# -*- makefile -*-
#
-# Copyright (C) 2013-2020 B.A.T.M.A.N. contributors
+# Copyright (C) 2013-2021 B.A.T.M.A.N. contributors
#
# License-Filename: LICENSES/preferred/GPL-2.0
diff --git a/gpsd/alfred-gpsd.c b/gpsd/alfred-gpsd.c
index 47d6a64..ee9e6e8 100644
--- a/gpsd/alfred-gpsd.c
+++ b/gpsd/alfred-gpsd.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2013-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2013-2021 B.A.T.M.A.N. contributors:
*
* Andrew Lunn, Simon Wunderlich
*
diff --git a/gpsd/alfred-gpsd.h b/gpsd/alfred-gpsd.h
index b5452b4..83d65bc 100644
--- a/gpsd/alfred-gpsd.h
+++ b/gpsd/alfred-gpsd.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2013-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2013-2021 B.A.T.M.A.N. contributors:
*
* Andrew Lunn, Simon Wunderlich
*
diff --git a/hash.c b/hash.c
index 82a287e..eb7ff1a 100644
--- a/hash.c
+++ b/hash.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2006-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2006-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
diff --git a/hash.h b/hash.h
index 32a9e57..0ff887a 100644
--- a/hash.h
+++ b/hash.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2006-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2006-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Marek Lindner
*
diff --git a/main.c b/main.c
index 5ae8187..37cc5eb 100644
--- a/main.c
+++ b/main.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/netlink.c b/netlink.c
index 865ed9f..5470b48 100644
--- a/netlink.c
+++ b/netlink.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2009-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2009-2021 B.A.T.M.A.N. contributors:
*
* Marek Lindner <mareklindner(a)neomailbox.ch>, Andrew Lunn <andrew(a)lunn.ch>
*
diff --git a/netlink.h b/netlink.h
index 2964a2b..74c32b5 100644
--- a/netlink.h
+++ b/netlink.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2009-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2009-2021 B.A.T.M.A.N. contributors:
*
* Marek Lindner <mareklindner(a)neomailbox.ch>, Andrew Lunn <andrew(a)lunn.ch>
*
diff --git a/netsock.c b/netsock.c
index 9b200d2..28beef1 100644
--- a/netsock.c
+++ b/netsock.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/packet.h b/packet.h
index 81ecbb9..7e91c58 100644
--- a/packet.h
+++ b/packet.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: MIT */
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich, Sven Eckelmann
*
diff --git a/recv.c b/recv.c
index 744080b..c4ac7e4 100644
--- a/recv.c
+++ b/recv.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/send.c b/send.c
index de530d9..5afe374 100644
--- a/send.c
+++ b/send.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/server.c b/server.c
index 37b11fe..5ea6683 100644
--- a/server.c
+++ b/server.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/unix_sock.c b/unix_sock.c
index 2bbc408..b05b8a2 100644
--- a/unix_sock.c
+++ b/unix_sock.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/util.c b/util.c
index f1dc0dc..c1ee1fa 100644
--- a/util.c
+++ b/util.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2012-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2012-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/vis/Makefile b/vis/Makefile
index 50c8efb..ab79775 100755
--- a/vis/Makefile
+++ b/vis/Makefile
@@ -2,7 +2,7 @@
# SPDX-License-Identifier: GPL-2.0
# -*- makefile -*-
#
-# Copyright (C) 2013-2020 B.A.T.M.A.N. contributors
+# Copyright (C) 2013-2021 B.A.T.M.A.N. contributors
#
# License-Filename: LICENSES/preferred/GPL-2.0
diff --git a/vis/vis.c b/vis/vis.c
index 1bb82ab..3b1f37c 100644
--- a/vis/vis.c
+++ b/vis/vis.c
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-2.0
-/* Copyright (C) 2013-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2013-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
diff --git a/vis/vis.h b/vis/vis.h
index 6f5b839..8033db6 100644
--- a/vis/vis.h
+++ b/vis/vis.h
@@ -1,5 +1,5 @@
/* SPDX-License-Identifier: GPL-2.0 */
-/* Copyright (C) 2013-2020 B.A.T.M.A.N. contributors:
+/* Copyright (C) 2013-2021 B.A.T.M.A.N. contributors:
*
* Simon Wunderlich
*
--
2.29.2
1 year, 4 months
[PATCH] batman-adv: Avoid sizeof on flexible structure
by Sven Eckelmann
The batadv_dhcp_packet is used to read in parts of the DHCP packet and
extract relevant information for the distributed arp table. But the
structure contained the flexible member "options" which is no where used in
the code.
A sizeof on this kind of type would return the size of everything except
the flexible member. But sparse will detect this kind of sizeof and warn
with
warning: using sizeof on a flexible structure
This can be avoided by dropping the unused flexible member.
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
net/batman-adv/distributed-arp-table.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/batman-adv/distributed-arp-table.c b/net/batman-adv/distributed-arp-table.c
index fd7ba6bb..d2ec419d 100644
--- a/net/batman-adv/distributed-arp-table.c
+++ b/net/batman-adv/distributed-arp-table.c
@@ -87,7 +87,7 @@ struct batadv_dhcp_packet {
__u8 sname[64];
__u8 file[128];
__be32 magic;
- __u8 options[];
+ /* __u8 options[]; */
};
#define BATADV_DHCP_YIADDR_LEN sizeof(((struct batadv_dhcp_packet *)0)->yiaddr)
--
2.29.2
1 year, 4 months
Routing Announcement Alfred Through
by nybash110998@gmail.com
Hello Everyone!
I want to present to the community my idea about spreading static ipv4 routes between mesh nodes.
So, it is my first project in C, before I only have an experience in bash. I know, it might have some weird methods (first painting cannot be good), but I am trying my best.
You can see what I suggest on my github page: https://github.com/nickbash11/raat , there you will find comprehensive information about what and how.
It just tries to recap the "community" mode in BMX6/BMX7 but with ALFRED. For now I test it between some virtualbox machines with OpenWRT 18/19. This time I do not have hardware resources (routers) to test it on the real network :(
All my devices are busy with qMp and I want to try some "pure" in the future, but I really used to see that each node has its own network behind it.
Maybe, I have invented a bicycle... don't no, anyway, check me out.
1 year, 5 months
[PATCH 0/8] pull request for net-next: batman-adv 2020-12-04
by Simon Wunderlich
Hi David, hi Jakub,
here is a late cleanup pull request of batman-adv to go into net-next.
Please pull or let me know of any problem!
Thank you,
Simon
The following changes since commit 992b03b88e36254e26e9a4977ab948683e21bd9f:
batman-adv: Don't always reallocate the fragmentation skb head (2020-11-27 08:02:55 +0100)
are available in the Git repository at:
git://git.open-mesh.org/linux-merge.git tags/batadv-next-pullrequest-20201204
for you to fetch changes up to 34a14c2e6310a348a3f23af6e95bf9ea040f3ec8:
batman-adv: Drop unused soft-interface.h include in fragmentation.c (2020-12-04 08:41:16 +0100)
----------------------------------------------------------------
This cleanup patchset includes the following patches:
- bump version strings, by Simon Wunderlich
- update include for min/max helpers, by Sven Eckelmann
- add infrastructure and netlink functions for routing algo selection,
by Sven Eckelmann (2 patches)
- drop deprecated debugfs and sysfs support and obsoleted
functionality, by Sven Eckelmann (3 patches)
- drop unused include in fragmentation.c, by Simon Wunderlich
----------------------------------------------------------------
Simon Wunderlich (2):
batman-adv: Start new development cycle
batman-adv: Drop unused soft-interface.h include in fragmentation.c
Sven Eckelmann (6):
batman-adv: Add new include for min/max helpers
batman-adv: Prepare infrastructure for newlink settings
batman-adv: Allow selection of routing algorithm over rtnetlink
batman-adv: Drop deprecated sysfs support
batman-adv: Drop deprecated debugfs support
batman-adv: Drop legacy code for auto deleting mesh interfaces
.../ABI/obsolete/sysfs-class-net-batman-adv | 32 -
Documentation/ABI/obsolete/sysfs-class-net-mesh | 110 --
MAINTAINERS | 2 -
include/uapi/linux/batman_adv.h | 26 +
net/batman-adv/Kconfig | 27 +-
net/batman-adv/Makefile | 3 -
net/batman-adv/bat_algo.c | 34 +-
net/batman-adv/bat_algo.h | 5 +-
net/batman-adv/bat_iv_ogm.c | 229 ----
net/batman-adv/bat_v.c | 247 +---
net/batman-adv/bat_v_elp.c | 1 +
net/batman-adv/bat_v_ogm.c | 1 +
net/batman-adv/bridge_loop_avoidance.c | 130 --
net/batman-adv/bridge_loop_avoidance.h | 16 -
net/batman-adv/debugfs.c | 442 -------
net/batman-adv/debugfs.h | 73 --
net/batman-adv/distributed-arp-table.c | 55 -
net/batman-adv/distributed-arp-table.h | 2 -
net/batman-adv/fragmentation.c | 3 +-
net/batman-adv/gateway_client.c | 39 -
net/batman-adv/gateway_client.h | 2 -
net/batman-adv/hard-interface.c | 35 +-
net/batman-adv/hard-interface.h | 25 +-
net/batman-adv/icmp_socket.c | 392 ------
net/batman-adv/icmp_socket.h | 38 -
net/batman-adv/log.c | 209 ----
net/batman-adv/main.c | 46 +-
net/batman-adv/main.h | 5 +-
net/batman-adv/multicast.c | 111 --
net/batman-adv/multicast.h | 3 -
net/batman-adv/netlink.c | 1 +
net/batman-adv/network-coding.c | 87 --
net/batman-adv/network-coding.h | 13 -
net/batman-adv/originator.c | 121 --
net/batman-adv/originator.h | 4 -
net/batman-adv/routing.c | 10 -
net/batman-adv/soft-interface.c | 137 +--
net/batman-adv/soft-interface.h | 1 -
net/batman-adv/sysfs.c | 1272 --------------------
net/batman-adv/sysfs.h | 93 --
net/batman-adv/tp_meter.c | 1 +
net/batman-adv/translation-table.c | 212 ----
net/batman-adv/translation-table.h | 3 -
net/batman-adv/types.h | 66 -
44 files changed, 121 insertions(+), 4243 deletions(-)
delete mode 100644 Documentation/ABI/obsolete/sysfs-class-net-batman-adv
delete mode 100644 Documentation/ABI/obsolete/sysfs-class-net-mesh
delete mode 100644 net/batman-adv/debugfs.c
delete mode 100644 net/batman-adv/debugfs.h
delete mode 100644 net/batman-adv/icmp_socket.c
delete mode 100644 net/batman-adv/icmp_socket.h
delete mode 100644 net/batman-adv/sysfs.c
delete mode 100644 net/batman-adv/sysfs.h
1 year, 5 months
[PATCH 1/2] vxlan: Add needed_headroom for lower device
by Sven Eckelmann
It was observed that sending data via batadv over vxlan (on top of
wireguard) reduced the performance massively compared to raw ethernet or
batadv on raw ethernet. A check of perf data showed that the
vxlan_build_skb was calling all the time pskb_expand_head to allocate
enough headroom for:
min_headroom = LL_RESERVED_SPACE(dst->dev) + dst->header_len
+ VXLAN_HLEN + iphdr_len;
But the vxlan_config_apply only requested needed headroom for:
lowerdev->hard_header_len + VXLAN6_HEADROOM or VXLAN_HEADROOM
So it completely ignored the needed_headroom of the lower device. The first
caller of net_dev_xmit could therefore never make sure that enough headroom
was allocated for the rest of the transmit path.
Cc: Annika Wickert <annika.wickert(a)exaring.de>
Signed-off-by: Sven Eckelmann <sven(a)narfation.org>
---
drivers/net/vxlan.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
index 236fcc55a5fd..25b5b5a2dfea 100644
--- a/drivers/net/vxlan.c
+++ b/drivers/net/vxlan.c
@@ -3799,6 +3799,7 @@ static void vxlan_config_apply(struct net_device *dev,
dev->gso_max_segs = lowerdev->gso_max_segs;
needed_headroom = lowerdev->hard_header_len;
+ needed_headroom += lowerdev->needed_headroom;
max_mtu = lowerdev->mtu - (use_ipv6 ? VXLAN6_HEADROOM :
VXLAN_HEADROOM);
--
2.29.2
1 year, 5 months