patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob ff4bf53f8c74f6559a70920df8197eaa840268bf 723 bytes (raw)
name: vm/sys/net/image/etc/mdev/iface 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
#!/bin/execlineb -P
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2020-2021 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2025 Yureka Lilian <yureka@cyberchaos.dev>

importas -Si INTERFACE

ifte

{
  # This interface is connected to the router
  if { xdp-loader load $INTERFACE /usr/lib/xdp/prog_router.o -m skb -p /sys/fs/bpf }
  if { ip link set $INTERFACE promisc on }
  if { set-router-iface $INTERFACE }
  ip link set $INTERFACE up
}

{
  if { test $INTERFACE != lo }
  # This is a physical connection to a network device.
  if { xdp-loader load $INTERFACE /usr/lib/xdp/prog_physical.o -m skb -p /sys/fs/bpf }
  ip link set $INTERFACE up
}

grep -iq ^02:01: /sys/class/net/${INTERFACE}/address

debug log:

solving ff4bf53 ...
found ff4bf53 in https://inbox.spectrum-os.org/spectrum-devel/20250923163519.48306-5-yureka@cyberchaos.dev/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20250924114300.100541-5-yureka@cyberchaos.dev/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20250923132012.28013-6-yureka@cyberchaos.dev/ ||
	https://inbox.spectrum-os.org/spectrum-devel/20251124163531.91029-3-yureka@cyberchaos.dev/
found 2306575 in https://spectrum-os.org/git/spectrum
preparing index
index prepared:
100755 23065757bff4370e4243a882e680437aea1de631	vm/sys/net/image/etc/mdev/iface

applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20250923163519.48306-5-yureka@cyberchaos.dev/
diff --git a/vm/sys/net/image/etc/mdev/iface b/vm/sys/net/image/etc/mdev/iface
index 2306575..ff4bf53 100755

Checking patch vm/sys/net/image/etc/mdev/iface...
Applied patch vm/sys/net/image/etc/mdev/iface cleanly.

skipping https://inbox.spectrum-os.org/spectrum-devel/20250924114300.100541-5-yureka@cyberchaos.dev/ for ff4bf53
skipping https://inbox.spectrum-os.org/spectrum-devel/20250923132012.28013-6-yureka@cyberchaos.dev/ for ff4bf53
skipping https://inbox.spectrum-os.org/spectrum-devel/20251124163531.91029-3-yureka@cyberchaos.dev/ for ff4bf53
index at:
100755 ff4bf53f8c74f6559a70920df8197eaa840268bf	vm/sys/net/image/etc/mdev/iface

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://spectrum-os.org/git/doc
	https://spectrum-os.org/git/mktuntap
	https://spectrum-os.org/git/spectrum
	https://spectrum-os.org/git/ucspi-vsock

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).