News for hackers. Stuff that matters.
Re:Systemd v218 by drdaeman on Sunday December 14, 2014 @10:42AM (#8748523)
I don't get it (and don't want to download and read systemd source). Could someone explain?

The docs say:

> native PPPoE library has been added to sd-network, systemd's library of light-weight networking protocols. This library will be used in a future version of networkd to enable PPPoE communication without an external pppd daemon. (emphasis mine)

Usually, it works like this - a separate entity (either as a separate daemon that talks to pppd through a pipe or as rp-pppoe.so plugin to Samba's pppd) does the PPPoE session discovery and management, then passes decapsulated PPP frames to a full-fledged PPP daemon implementation. Which is a quite large entity.

Did they implement only PPPoE part (that is, just handling encapsulated PPP frames) or systemd now has a full-fledged PPP (with all the important subprotocols like LCP, EAP, IPCP and possibly IP6CP) reimplementation?

Not like I care about systemd gaining PPP support. Heck, they want to build their own OS core - that's great. What I don't get is why rewrite things that aren't broken in the first place? (Samba's pppd may be a bit messy and has some nearly-dead stuff like IPX support, but is generally fine.)

Re:Systemd v218 by digi_owl on Sunday December 14, 2014 @03:51PM (#8749514)
Likely the existing pppd don't play well with systemd's automagical detection of network status, and the unit files that depend on that.
Re:Systemd v218 by drdaeman on Sunday December 14, 2014 @04:47PM (#8749677)
Why not just spawn pppd from networkd?

They can write a full-fledged pppd replacement, but can't just have pppd as a child process and happily control it? (May possibly need a tiny patch or two, but that's barely an issue)

I'd get it if one needs some very tight integration, but pppd is self-sufficient, fairly controllable and well-tested.

Looks like NIH syndrome to me. But maybe I'm missing something from the picture and pppd isn't a good fit. Then, okay.

Re:Systemd v218 by digi_owl on Sunday December 14, 2014 @05:27PM (#8749796)
I'm no insider, so all i can say is that i suspect http://ewontfix.com/15/ holds the key.

Existing pppd would have to be using one of simple, forking, oneshot or idle to indicate that it is up. And quite possible they have deemed that too unreliable for whatever use case they have.

The other options would be to modify the existing pppd to use dbus or notify. And at that point they may well have gone with reimplementing the parts of ppp they need for their existing use case.

Re:Systemd v218 by drdaeman on Monday December 15, 2014 @12:25PM (#8753084)
My memory is a bit blurry, but IIRC with `nodetach` option pppd would fit "simple" category or its derivatives well.

Teaching it to notify via dbus is as trivial as passing a bunch of `connect /usr/lib/networkd/ppp/ip-down`-type options or writing a simple plugin library to do dbus messaging or `sd_notify` calls. Available plugin API hooks should allow for anything necessary to have a good understanding of pppd's state and provide a good amount of control over it (link state changes, authentication, IP address negotiation, idling etc) when necessary: http://ftp.samba.org/pub/unpacked/ppp/PLUGINS

I'm almost certain there's no need to write a whole new pppd from scratch.