ref: 4f9aed04b7101c81af6fd3f4af7ef60ef6894dbf
parent: 49dd6764ea79d2b88d228e701f73b7c59e4cae35
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Sun May 12 09:39:58 EDT 2024
devip: make "null" medium bindable It can actually be usefull to bind this dummy "null" medium to an address, which gives a way to divert packets towards it that should be discarded.
--- a/sys/src/9/ip/nullmedium.c
+++ b/sys/src/9/ip/nullmedium.c
@@ -10,7 +10,6 @@
static void
nullbind(Ipifc*, int, char**)
{- error("cannot bind null device");}
static void
@@ -27,6 +26,7 @@
Medium nullmedium =
{+.maxtu= 64*1024,
.name= "null",
.bind= nullbind,
.unbind= nullunbind,
@@ -36,6 +36,7 @@
/* used in ipifc to prevent unbind while bind is in progress */
Medium unboundmedium =
{+.maxtu= 64*1024,
.name= "unbound",
.bind= nullbind,
.unbind= nullunbind,
--
⑨