summaryrefslogtreecommitdiff
path: root/eth-multiplexer
diff options
context:
space:
mode:
authorJustus Winter <justus@gnupg.org>2016-11-05 18:05:06 +0100
committerJustus Winter <justus@gnupg.org>2016-11-05 18:05:06 +0100
commitfd3b0bc1b318a2cc95ac1f85e308708c4bb8999a (patch)
tree4254e0e0909b6eb0f8171d8d4ebb9bb380d89b1a /eth-multiplexer
parented257f4e3320307eca7ed181f6e2dd6e699efb41 (diff)
eth-multiplexer: Fix retrieving status of virtual interfaces.
Previously, the ethernet multiplexer returned the status of the real network device if one was configured. This had the unfortunate consequence that all virtual devices shared the same ethernet address. * eth-multiplexer/device_impl.c (ds_device_get_status): Always return the information for the virtual device. * eth-multiplexer/vdev.h (dev_getstat): Add prototype.
Diffstat (limited to 'eth-multiplexer')
-rw-r--r--eth-multiplexer/device_impl.c10
-rw-r--r--eth-multiplexer/vdev.h5
2 files changed, 7 insertions, 8 deletions
diff --git a/eth-multiplexer/device_impl.c b/eth-multiplexer/device_impl.c
index d96fc0f0..4796d5b3 100644
--- a/eth-multiplexer/device_impl.c
+++ b/eth-multiplexer/device_impl.c
@@ -178,16 +178,10 @@ kern_return_t
ds_device_get_status (struct vether_device *vdev, dev_flavor_t flavor,
dev_status_t status, size_t *statuslen)
{
- extern io_return_t dev_getstat (struct vether_device *, dev_flavor_t,
- dev_status_t, natural_t *);
- kern_return_t ret = 0;
if (vdev == NULL)
return D_NO_SUCH_DEVICE;
- if(ether_port != MACH_PORT_NULL)
- ret = device_get_status (ether_port, flavor, status, statuslen);
- else
- ret = dev_getstat (vdev, flavor, status, statuslen);
- return ret;
+
+ return dev_getstat (vdev, flavor, status, statuslen);
}
kern_return_t
diff --git a/eth-multiplexer/vdev.h b/eth-multiplexer/vdev.h
index c8696785..c98c4418 100644
--- a/eth-multiplexer/vdev.h
+++ b/eth-multiplexer/vdev.h
@@ -76,4 +76,9 @@ int broadcast_msg (struct net_rcv_msg *msg);
int get_dev_num ();
int foreach_dev_do (dev_act_func func);
+/* dev_stat.c */
+io_return_t dev_getstat (struct vether_device *, dev_flavor_t,
+ dev_status_t, natural_t *);
+
+
#endif