patches and low-level development discussion
 help / color / mirror / code / Atom feed
blob da45ce92fd4034ebd16a0b7255bc61474716e41e 766 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
26
 
#!/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 }
  if { ip link set $INTERFACE promisc on }
  ip link set $INTERFACE up
}

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

debug log:

solving da45ce9 ...
found da45ce9 in https://spectrum-os.org/git/spectrum

(*) 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).