diff options
| author | Simon Rettberg | 2021-03-08 15:55:33 +0100 |
|---|---|---|
| committer | Simon Rettberg | 2021-03-08 15:55:33 +0100 |
| commit | 6707d9218c8e6e760e53068d5f41ceb31fac6ea0 (patch) | |
| tree | 88e8fc84ede2a0ed2c1cec3a6109beb9fb53abf5 /src/core/interface.c | |
| parent | Merge branch 'master' into openslx (diff) | |
| parent | [linux] Do not assume that stat() works on sysfs files (diff) | |
| download | ipxe-6707d9218c8e6e760e53068d5f41ceb31fac6ea0.tar.gz ipxe-6707d9218c8e6e760e53068d5f41ceb31fac6ea0.tar.xz ipxe-6707d9218c8e6e760e53068d5f41ceb31fac6ea0.zip | |
Merge branch 'master' into openslx
Diffstat (limited to 'src/core/interface.c')
| -rw-r--r-- | src/core/interface.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/core/interface.c b/src/core/interface.c index 402aa4541..34a4180a5 100644 --- a/src/core/interface.c +++ b/src/core/interface.c @@ -81,9 +81,14 @@ struct interface null_intf = INTF_INIT ( null_intf_desc ); * interface is updated to point to the new destination interface. */ void intf_plug ( struct interface *intf, struct interface *dest ) { + + if ( intf == &null_intf ) + return; + DBGC ( INTF_COL ( intf ), "INTF " INTF_INTF_FMT " replug to " INTF_FMT "\n", INTF_INTF_DBG ( intf, intf->dest ), INTF_DBG ( dest ) ); + intf_get ( dest ); intf_put ( intf->dest ); intf->dest = dest; @@ -386,6 +391,23 @@ void intfs_restart ( int rc, ... ) { } /** + * Insert a filter interface + * + * @v intf Object interface + * @v upper Upper end of filter + * @v lower Lower end of filter + */ +void intf_insert ( struct interface *intf, struct interface *upper, + struct interface *lower ) { + struct interface *dest = intf->dest; + + intf_get ( dest ); + intf_plug_plug ( intf, upper ); + intf_plug_plug ( lower, dest ); + intf_put ( dest ); +} + +/** * Poke an object interface * * @v intf Object interface |
