Skip to content

Commit c559b8f

Browse files
authored
Merge pull request #1384 from kernelkit/new-frr
2 parents 3ffbef7 + 4a31df1 commit c559b8f

74 files changed

Lines changed: 4505 additions & 855 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
MGMTD_ARGS="-A 127.0.0.1 -u frr -g frr --log syslog --log-level err -M grpc"
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#set DEBUG=1
2+
service [2345] <pid/confd,pid/staticd> name:netd netd -- Network route daemon
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../available/netd.conf
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Default FRR daemons file for Infix - confd overwrites on routing changes.
2+
# watchfrr, zebra, mgmtd, and staticd are always started by frrinit.sh.
3+
ospfd=no
4+
ripd=no
5+
bfdd=no
6+
bgpd=no
7+
ospf6d=no
8+
ripngd=no
9+
isisd=no
10+
pimd=no
11+
pim6d=no
12+
ldpd=no
13+
eigrpd=no
14+
babeld=no
15+
vrrpd=no
16+
pathd=no
17+
18+
vtysh_enable=yes
19+
watchfrr_options="-l 4"
20+
zebra_options=" -A 127.0.0.1 -s 90000000"
21+
mgmtd_options=" -A 127.0.0.1"
22+
ospfd_options=" -A 127.0.0.1"
23+
ripd_options=" -A 127.0.0.1"
24+
staticd_options="-A 127.0.0.1"
25+
bfdd_options=" -A 127.0.0.1"
26+
27+
frr_profile="traditional"
28+
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Replaces default frr.conf file
2+
log syslog warnings

board/common/rootfs/etc/frr/static.d/00default.conf

Lines changed: 0 additions & 9 deletions
This file was deleted.
File renamed without changes.

board/common/rootfs/usr/libexec/infix/iw.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -290,6 +290,14 @@ def parse_interface_info(ifname):
290290
if power_match:
291291
result['txpower'] = float(power_match.group(1))
292292

293+
# wiphy index -> phy/radio name
294+
elif stripped.startswith('wiphy '):
295+
try:
296+
wiphy_idx = int(stripped.split()[1])
297+
result['phy'] = normalize_phy_name(f'phy{wiphy_idx}')
298+
except (ValueError, IndexError):
299+
pass
300+
293301
return result
294302

295303

board/common/rootfs/usr/sbin/staticd-helper

Lines changed: 0 additions & 15 deletions
This file was deleted.

board/common/rootfs/usr/share/udhcpc/default.script

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ ACTION="$1"
77
IP_CACHE="/var/lib/misc/${interface}.cache"
88
RESOLV_CONF="/run/resolvconf/interfaces/${interface}.conf"
99
NTPFILE="/run/chrony/dhcp-sources.d/${interface}.sources"
10-
NAME="/etc/frr/static.d/${interface}-dhcp.conf"
10+
NAME="/etc/netd/conf.d/${interface}-dhcp.conf"
1111
NEXT="${NAME}+"
1212

1313
[ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
@@ -75,14 +75,23 @@ was_option_requested()
7575
# client MUST ignore the Router option.
7676
set_dhcp_routes()
7777
{
78-
echo "! Generated by udhcpc" > "$NEXT"
78+
echo "# Generated by udhcpc" > "$NEXT"
79+
echo "" >> "$NEXT"
7980
if [ -n "$staticroutes" ]; then
8081
if was_option_requested 121; then
8182
# format: dest1/mask gw1 ... destn/mask gwn
8283
set -- $staticroutes
8384
while [ -n "$1" -a -n "$2" ]; do
8485
dbg "adding route $1 via $2 metric $metric tag 100"
85-
echo "ip route $1 $2 $metric tag 100" >> "$NEXT"
86+
cat >> "$NEXT" <<-EOF
87+
route {
88+
prefix = "$1"
89+
nexthop = "$2"
90+
distance = $metric
91+
tag = 100
92+
}
93+
94+
EOF
8695
shift 2
8796
done
8897
else
@@ -91,7 +100,15 @@ set_dhcp_routes()
91100
elif [ -n "$router" ] ; then
92101
if was_option_requested 3; then
93102
for i in $router ; do
94-
echo "ip route 0.0.0.0/0 $i $metric tag 100" >> "$NEXT"
103+
cat >> "$NEXT" <<-EOF
104+
route {
105+
prefix = "0.0.0.0/0"
106+
nexthop = "$i"
107+
distance = $metric
108+
tag = 100
109+
}
110+
111+
EOF
95112
done
96113
else
97114
log "ignoring unrequested router (option 3)"
@@ -102,7 +119,7 @@ set_dhcp_routes()
102119
cmp -s "$NAME" "$NEXT" && return
103120
mv "$NEXT" "$NAME"
104121

105-
initctl -nbq restart staticd
122+
initctl reload netd
106123
}
107124

108125
clr_dhcp_routes()
@@ -111,7 +128,7 @@ clr_dhcp_routes()
111128
[ -f "$NAME" ] || return
112129
rm "$NAME"
113130

114-
initctl -nbq restart staticd
131+
initctl reload netd
115132
}
116133

117134
clr_dhcp_addresses()

0 commit comments

Comments
 (0)