Discussion:
rump shmif
(too old to reply)
Robert Swindells
2020-08-16 20:45:34 UTC
Permalink
Is there a reason why shmif(4) doesn't have a fake ifmedia struct ?

The tap(4) interface does have a fake one.

Was thinking it could return active or no carrier depending on whether
a linkstr was set.

Robert Swindells

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Robert Swindells
2020-08-17 12:10:34 UTC
Permalink
Post by Robert Swindells
Is there a reason why shmif(4) doesn't have a fake ifmedia struct ?
The tap(4) interface does have a fake one.
It doesn't set the status though, maybe it should.
Post by Robert Swindells
Was thinking it could return active or no carrier depending on whether
a linkstr was set.
Have tried out the attached patch, dhcpcd(8) seems to work much better
with it.

Not tried running tests yet with shmif(4) and tap(4) changes, can anyone
think of something that would break with them ?
Roy Marples
2020-08-17 21:00:05 UTC
Permalink
Post by Robert Swindells
Have tried out the attached patch, dhcpcd(8) seems to work much better
with it.
You don't need to add, set or remove all that media.
PPP had patches to do similar:
https://github.com/NetBSD/src/commit/90318188b02efd0ce163e8920466aa8be4226dea#diff-37ec0205a7e835678a2eac208de16179
https://github.com/NetBSD/src/commit/e00f7be6be06daacbe05016bc2a7a4ceeb06bc4a#diff-37ec0205a7e835678a2eac208de16179

Roy

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Robert Swindells
2020-08-17 21:19:51 UTC
Permalink
Post by Roy Marples
Post by Robert Swindells
Have tried out the attached patch, dhcpcd(8) seems to work much better
with it.
You don't need to add, set or remove all that media.
The media list is representative of an ethernet device and it matches
what is in tap(4).

I also got rump.rtadvd to start up with the following patch, it isn't
seeing the Router Solicitation that dhcpcd(8) is sending though.

Does something need to be enabled in rump to get router message
filtering to work ?

Index: rtadvd.c
===================================================================
RCS file: /cvsroot/src/usr.sbin/rtadvd/rtadvd.c,v
retrieving revision 1.78
diff -u -r1.78 rtadvd.c
--- rtadvd.c 14 May 2020 23:42:18 -0000 1.78
+++ rtadvd.c 17 Aug 2020 21:13:32 -0000
@@ -1614,7 +1614,7 @@
exit(EXIT_FAILURE);
}
#ifdef RO_MSGFILTER
- if (setsockopt(rtsock, PF_ROUTE, RO_MSGFILTER,
+ if (prog_setsockopt(rtsock, PF_ROUTE, RO_MSGFILTER,
&msgfilter, sizeof(msgfilter) == -1))
logit(LOG_ERR, "%s: RO_MSGFILTER: %m", __func__);
#endif

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Roy Marples
2020-08-18 08:40:49 UTC
Permalink
Post by Robert Swindells
Post by Roy Marples
Post by Robert Swindells
Have tried out the attached patch, dhcpcd(8) seems to work much better
with it.
You don't need to add, set or remove all that media.
The media list is representative of an ethernet device and it matches
what is in tap(4).
tap(4) is not a physical ethernet device though - it's a virtual one. There is
no physical media and we should not pretend it has.

My urtwn(4) is a physical ethernet interface as well and it's media list is
totally different because it's wireless. Should tap(4) list this media as well
because etherent is ethernet?

Whilst I'm happy with adding the link status, I am opposed to adding any media
to it.

Roy

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Robert Swindells
2020-08-18 13:24:29 UTC
Permalink
Post by Roy Marples
Post by Robert Swindells
Post by Roy Marples
Post by Robert Swindells
Have tried out the attached patch, dhcpcd(8) seems to work much better
with it.
You don't need to add, set or remove all that media.
The media list is representative of an ethernet device and it matches
what is in tap(4).
tap(4) is not a physical ethernet device though - it's a virtual
one. There is no physical media and we should not pretend it has.
My urtwn(4) is a physical ethernet interface as well and it's media list
is totally different because it's wireless. Should tap(4) list this
media as well because etherent is ethernet?
Whilst I'm happy with adding the link status, I am opposed to adding any
media to it.
It might be more useful if you could help get this stuff to work, we can
discuss the details of what gets committed to CVS later.

You wrote that the privsep code in dhcpcd(8) doesn't work under rump,
does the equivalent stuff in rtadvd need to be disabled for rump builds
too ?

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Roy Marples
2020-08-18 13:35:41 UTC
Permalink
Post by Robert Swindells
It might be more useful if you could help get this stuff to work, we can
discuss the details of what gets committed to CVS later.
You wrote that the privsep code in dhcpcd(8) doesn't work under rump,
does the equivalent stuff in rtadvd need to be disabled for rump builds
too ?
I have no idea about rtadvd and rump sorry.

I've looked into getting full rump support into dhcpcd and from what it
requires, it looks pretty invasive. I'm currently investingating an alternative
way of doing it, but I'm very time limited right now. Maybe I'll have more time
when I go on holiday next week but I think the kids have other ideas.

Roy

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Robert Swindells
2020-08-18 19:57:45 UTC
Permalink
Post by Roy Marples
Post by Robert Swindells
It might be more useful if you could help get this stuff to work, we can
discuss the details of what gets committed to CVS later.
You wrote that the privsep code in dhcpcd(8) doesn't work under rump,
does the equivalent stuff in rtadvd need to be disabled for rump builds
too ?
I have no idea about rtadvd and rump sorry.
Ok, have tried building rump.rtadvd without the privsep code and it
seems to work now.
Post by Roy Marples
I've looked into getting full rump support into dhcpcd and from what it
requires, it looks pretty invasive. I'm currently investingating an
alternative way of doing it, but I'm very time limited right now. Maybe
I'll have more time when I go on holiday next week but I think the kids
have other ideas.
It seems to be nearly working when built with SMALLPROG then run with
rumphijack.

Maybe just include a SMALLPROG build alongside the normal one.

If I use the "-T" flag to dhcpcd(8) it now sends a RS and gets back a
RA, it doesn't set the address of the interface though as expected.

If I leave off the "-T" flag it does this:

main: control_open: Undefined error: 0
dhcpcd-9.1.4 starting
main: control_start: No such file or directory
dhcpcd exited

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...